DEBUG寄存器:word 0xa0000010
word 0xa0000010 1 //debug开
word 0xa0000010 0 //debug关
当然也可以按模块打开/关闭debug信息,如 DBGCFG_KMF/DBGCFG_UMF/DBGCFG_MENU/DBGCFG_TUNER模块等。
所以大家在使用过程中要按源文件所在的模块加打印信息,这样的话,按模块开启或关闭打印信息较为方便。
如在“atv_app.c”中添加打印信息,应该使用“atv_printf()”而不是“printf()”,因为在“atv_app.c”中已经定义了如下关联:
#define atv_printf(fmt, arg...) UMFDBG(0,"[ATV App]" fmt, ##arg)
将“atv_printf”与“UMFDBG”进行了关联,我们设置“word 0xa0000010 0x400”可以单独控制此模块的debug。
不同模块设置的寄存器值是不一样的,如umf debug值为0x400,具体在文件“drv_debug.h”中定义。
#define DBGCONFIG1ADDR 0xa0000010#define DBGCONFIG2ADDR 0xa0000014// pdbgconf1 Flags#define DBGCFG_VIP (1 << MODULEID_VIP) // 0x1#define DBGCFG_MPEG (1 << MODULEID_MPEG) // 0x2#define DBGCFG_CVD2 (1 << MODULEID_CVD2) // 0x4#define DBGCFG_ADC (1 << MODULEID_ADC) // 0x8#define DBGCFG_HDMI (1 << MODULEID_HDMI) // 0x10#define DBGCFG_AUDIO (1 << MODULEID_AUDIO) // 0x20#define DBGCFG_BLT (1 << MODULEID_BLT) // 0x40 // not used. reserved.#define DBGCFG_OSDLIB (1 << MODULEID_OSDLIB) // 0x80 // not used. reserved.#define DBGCFG_TUNER (1 << MODULEID_TUNER) // 0x100#define DBGCFG_KMF (1 << MODULEID_KMF) // 0x200#define DBGCFG_UMF (1 << MODULEID_UMF) // 0x400 #define DBGCFG_MENU (1 << MODULEID_MENU) // 0x800 // not used. reserved.#define DBGCFG_DEMUX (1 << MODULEID_DEMUX) // 0x1000 // not used. reserved.#define DBGCFG_PSI (1 << MODULEID_PSI) // 0x2000#define DBGCFG_EPG (1 << MODULEID_EPG) // 0x4000 // not used. reserved.#define DBGCFG_SUBTITLE (1 << MODULEID_SUBTITLE) // 0x8000 // not used. reserved.#define DBGCFG_ATVCC (1 << MODULEID_ATVCC) // 0x10000#define DBGCFG_DTVCC (1 << MODULEID_DTVCC) // 0x20000#define DBGCFG_TTSLICER (1 << MODULEID_TTSLICER) // 0x40000#define DBGCFG_TTDECODER (1 << MODULEID_TTDECORDER) // 0x80000#define DBGCFG_JPEG (1 << MODULEID_JPEG) // 0x100000 // not used. reserved.#define DBGCFG_USB (1 << MODULEID_USB) // 0x200000 // not used. reserved.#define DBGCFG_IR (1 << MODULEID_IR) // 0x400000#define DBGCFG_KEYPAD (1 << MODULEID_KEYPAD) // 0x800000#define DBGCFG_SPI (1 << MODULEID_SPI) // 0x1000000 #define DBGCFG_I2C (1 << MODULEID_I2C) // 0x2000000#define DBGCFG_EDID (1 << MODULEID_EDID) // 0x4000000#define DBGCFG_GPIO (1 << MODULEID_GPIO) // 0x8000000#define DBGCFG_LE (1 << MODULEID_LE) // 0x10000000 // not used. reserved.#define DBGCFG_CEC (1 << MODULEID_CEC) // 0x20000000#define DBGCFG_VBV (1 << MODULEID_VBV) // 0x40000000 // used for runav log.#define DBGCFG_CI (1 << MODULEID_CI) // 0x80000000//~ end of pdbgconf1 Flags// pdbgconf2 Flags#define DBGCFG_MP3 ( 1 << (MODULEID_MP3% 32) ) // 0x1 // not used. reserved.#define DBGCFG_CECSWITCH ( 1 << (MODULEID_CECSWITCH % 32) ) // 0x2#define DBGCFG_PVR ( 1 << (MODULEID_PVR % 32) ) // 0x4#define DBGCFG_DVBEUMIDDLEWARE ( 1 << (MODULEID_DVBEUMIDDLEWARE % 32) ) // 0x4 // not used. reserved.#define DBGCFG_HDMIOUT ( 1 << (MODULEID_HDMIOUT % 32) ) // 0x10 // not used. reserved.#define DBGCFG_FRAMEBUFFER ( 1 << (MODULEID_FRAMEBUFFER % 32) ) // 0x20 // not used. reserved.#define DBGCFG_2D ( 1 << (MODULEID_2D % 32) ) // 0x40 // not used. reserved.#define DBGCFG_SMP ( 1 << (MODULEID_SMP % 32) ) // 0x80 // not used. reserved.#define DBGCFG_ALSA (1<<(MODULEID_ALSA%32)) // 0x100 // not used. reserved.#define DBGCFG_RUNAV (1<<(MODULEID_RUNAV%32)) //0x1000 //used for runav debug log.#define DBGCFG_AUTOREBOOT 0x20000000 // not used. reserved.#define DBGCFG_AUTORUN_USB 0x40000000 // not used. reserved.#define DBGCFG_NOAUTORUN 0x80000000 // not used. reserved.