diff options
Diffstat (limited to 'firmware/target/arm/tms320dm320/debug-dm320.c')
-rwxr-xr-x | firmware/target/arm/tms320dm320/debug-dm320.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c index 417dfee961..e12d86a03d 100755 --- a/firmware/target/arm/tms320dm320/debug-dm320.c +++ b/firmware/target/arm/tms320dm320/debug-dm320.c | |||
@@ -35,7 +35,7 @@ bool __dbg_ports(void) | |||
35 | 35 | ||
36 | bool __dbg_hw_info(void) | 36 | bool __dbg_hw_info(void) |
37 | { | 37 | { |
38 | int line = 0, button; | 38 | int line = 0, button, oldline; |
39 | int *address=0x0; | 39 | int *address=0x0; |
40 | bool done=false; | 40 | bool done=false; |
41 | char buf[100]; | 41 | char buf[100]; |
@@ -43,11 +43,25 @@ bool __dbg_hw_info(void) | |||
43 | lcd_setmargins(0, 0); | 43 | lcd_setmargins(0, 0); |
44 | lcd_setfont(FONT_SYSFIXED); | 44 | lcd_setfont(FONT_SYSFIXED); |
45 | lcd_clear_display(); | 45 | lcd_clear_display(); |
46 | |||
47 | /* Put all the static text befor the while loop */ | ||
46 | lcd_puts(0, line++, "[Hardware info]"); | 48 | lcd_puts(0, line++, "[Hardware info]"); |
49 | |||
50 | lcd_puts(0, line++, "Clock info:"); | ||
51 | snprintf(buf, sizeof(buf), "IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x", | ||
52 | IO_CLK_PLLA, IO_CLK_PLLB, IO_CLK_SEL0, IO_CLK_SEL1); lcd_puts(0, line++, buf); | ||
53 | snprintf(buf, sizeof(buf), "IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x", | ||
54 | IO_CLK_SEL2, IO_CLK_DIV0, IO_CLK_DIV1, IO_CLK_DIV2); lcd_puts(0, line++, buf); | ||
55 | snprintf(buf, sizeof(buf), "IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x", | ||
56 | IO_CLK_DIV3, IO_CLK_DIV4, IO_CLK_BYP, IO_CLK_INV); lcd_puts(0, line++, buf); | ||
57 | snprintf(buf, sizeof(buf), "IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x", | ||
58 | IO_CLK_MOD0, IO_CLK_MOD1, IO_CLK_MOD2, IO_CLK_LPCTL0); lcd_puts(0, line++, buf); | ||
47 | 59 | ||
60 | line++; | ||
61 | oldline=line; | ||
48 | while(!done) | 62 | while(!done) |
49 | { | 63 | { |
50 | line = 0; | 64 | line = oldline; |
51 | button = button_get(false); | 65 | button = button_get(false); |
52 | button&=~BUTTON_REPEAT; | 66 | button&=~BUTTON_REPEAT; |
53 | if (button == BUTTON_POWER) | 67 | if (button == BUTTON_POWER) |
@@ -61,14 +75,14 @@ bool __dbg_hw_info(void) | |||
61 | else if (button==BUTTON_RC_REW) | 75 | else if (button==BUTTON_RC_REW) |
62 | address-=0x800; | 76 | address-=0x800; |
63 | 77 | ||
64 | snprintf(buf, sizeof(buf), "current tick: %04x", (unsigned int)current_tick); | 78 | snprintf(buf, sizeof(buf), "current tick: %08x Seconds running: %08d", |
65 | lcd_puts(0, line++, buf); | 79 | (unsigned int)current_tick, (unsigned int)current_tick/100); lcd_puts(0, line++, buf); |
66 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)address, *address); | 80 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", |
67 | lcd_puts(0, line++, buf); | 81 | (unsigned int)address, *address); lcd_puts(0, line++, buf); |
68 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+1), *(address+1)); | 82 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", |
69 | lcd_puts(0, line++, buf); | 83 | (unsigned int)(address+1), *(address+1)); lcd_puts(0, line++, buf); |
70 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", (unsigned int)(address+2), *(address+2)); | 84 | snprintf(buf, sizeof(buf), "Address: 0x%08x Data: 0x%08x", |
71 | lcd_puts(0, line++, buf); | 85 | (unsigned int)(address+2), *(address+2)); lcd_puts(0, line++, buf); |
72 | 86 | ||
73 | lcd_update(); | 87 | lcd_update(); |
74 | } | 88 | } |