mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
M:Robe 500 - Add some more debug information.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23561 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
50d75f35e9
commit
c3edcad1aa
1 changed files with 130 additions and 33 deletions
|
|
@ -7,7 +7,7 @@
|
|||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2007 by Karl Kurbjun
|
||||
* Copyright (C) 2007, 2009 by Karl Kurbjun
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
@ -31,12 +31,93 @@
|
|||
#include "font.h"
|
||||
#include "lcd-target.h"
|
||||
|
||||
#ifndef CREATIVE_ZVx
|
||||
#if defined(MROBE_500)
|
||||
#include "tsc2100.h"
|
||||
#include "m66591.h"
|
||||
#endif
|
||||
|
||||
bool __dbg_ports(void)
|
||||
{
|
||||
#if defined(MROBE_500)
|
||||
int line = 0;
|
||||
int i;
|
||||
int button;
|
||||
bool done=false;
|
||||
|
||||
lcd_setfont(FONT_SYSFIXED);
|
||||
lcd_clear_display();
|
||||
|
||||
while(!done)
|
||||
{
|
||||
line = 0;
|
||||
button = button_get(false);
|
||||
button&=~BUTTON_REPEAT;
|
||||
if (button == BUTTON_POWER)
|
||||
done=true;
|
||||
|
||||
lcd_puts(0, line++, "[USB Information]");
|
||||
|
||||
lcd_putsf(0, line++, "TRN_CTRL: 0x%04x TRN_LNSTAT: 0x%04x",
|
||||
M66591_TRN_CTRL, M66591_TRN_LNSTAT);
|
||||
lcd_putsf(0, line++, "HSFS: 0x%04x TESTMODE: 0x%04x",
|
||||
M66591_HSFS, M66591_TESTMODE);
|
||||
lcd_putsf(0, line++, "PIN_CFG0: 0x%04x PIN_CFG1: 0x%04x",
|
||||
M66591_PIN_CFG0, M66591_PIN_CFG1);
|
||||
lcd_putsf(0, line++, "PIN_CFG2: 0x%04x", M66591_PIN_CFG2);
|
||||
lcd_putsf(0, line++, "DCP_CTRLEN: 0x%04x", M66591_DCP_CTRLEN);
|
||||
lcd_putsf(0, line++, "CPORT_CTRL0: 0x%04x CPORT_CTRL1: 0x%04x",
|
||||
M66591_CPORT_CTRL0, M66591_CPORT_CTRL1);
|
||||
lcd_putsf(0, line++, "CPORT_CTRL2: 0x%04x DPORT_CTRL0: 0x%04x",
|
||||
M66591_CPORT_CTRL2, M66591_DPORT_CTRL0);
|
||||
lcd_putsf(0, line++, "DPORT_CTRL1: 0x%04x DPORT_CTRL2: 0x%04x",
|
||||
M66591_DPORT_CTRL1, M66591_DPORT_CTRL2);
|
||||
lcd_putsf(0, line++, "INTCFG_MAIN: 0x%04x INTCFG_OUT: 0x%04x",
|
||||
M66591_INTCFG_MAIN, M66591_INTCFG_OUT);
|
||||
lcd_putsf(0, line++, "INTCFG_RDY: 0x%04x INTCFG_NRDY: 0x%04x",
|
||||
M66591_INTCFG_RDY, M66591_INTCFG_NRDY);
|
||||
lcd_putsf(0, line++, "INTCFG_EMP: 0x%04x INTSTAT_MAIN: 0x%04x",
|
||||
M66591_INTCFG_EMP, M66591_INTSTAT_MAIN);
|
||||
lcd_putsf(0, line++, "INTSTAT_RDY: 0x%04x INTSTAT_NRDY: 0x%04x",
|
||||
M66591_INTSTAT_RDY, M66591_INTSTAT_NRDY);
|
||||
lcd_putsf(0, line++, "INTSTAT_EMP: 0x%04x USB_ADDRESS: 0x%04x",
|
||||
M66591_INTSTAT_EMP, M66591_USB_ADDRESS);
|
||||
lcd_putsf(0, line++, "USB_REQ0: 0x%04x USB_REQ1: 0x%04x",
|
||||
M66591_USB_REQ0, M66591_USB_REQ1);
|
||||
lcd_putsf(0, line++, "USB_REQ2: 0x%04x USB_REQ3: 0x%04x",
|
||||
M66591_USB_REQ2, M66591_USB_REQ3);
|
||||
lcd_putsf(0, line++, "DCP_CNTMD: 0x%04x DCP_MXPKSZ: 0x%04x",
|
||||
M66591_DCP_CNTMD, M66591_DCP_MXPKSZ);
|
||||
lcd_putsf(0, line++, "DCPCTRL: 0x%04x", M66591_DCPCTRL);
|
||||
|
||||
line++;
|
||||
for(i=1; i<6; i++) {
|
||||
M66591_PIPE_CFGWND=i;
|
||||
lcd_putsf(0, line++, "PIPE_CFGSEL:0x%04x PIPE_CFGWND: 0x%04x",
|
||||
M66591_PIPE_CFGSEL, M66591_PIPE_CFGWND);
|
||||
}
|
||||
line++;
|
||||
|
||||
lcd_putsf(0, line++, "PIPECTRL1: 0x%04x PIPECTRL2: 0x%04x",
|
||||
M66591_PIPECTRL1, M66591_PIPECTRL2);
|
||||
lcd_putsf(0, line++, "PIPECTRL3: 0x%04x PIPECTRL4: 0x%04x",
|
||||
M66591_PIPECTRL3, M66591_PIPECTRL4);
|
||||
lcd_putsf(0, line++, "PIPECTRL5: 0x%04x PIPECTRL6: 0x%04x",
|
||||
M66591_PIPECTRL5, M66591_PIPECTRL6);
|
||||
|
||||
lcd_putsf(0, line++, "GIO_BITSET0: 0x%04x GIO_BITSET1: 0x%04x",
|
||||
IO_GIO_BITSET0, IO_GIO_BITSET1);
|
||||
|
||||
lcd_putsf(0, line++, "GIO_BITSET2: 0x%04x", IO_GIO_BITSET2);
|
||||
|
||||
lcd_putsf(0, line++, "SDRAM_SDMODE: 0x%04x SDRAM_REFCTL: 0x%04x",
|
||||
IO_SDRAM_SDMODE, IO_SDRAM_REFCTL);
|
||||
|
||||
lcd_putsf(0, line++, "EMIF_CS4CTRL1:0x%04x EMIF_CS4CTRL2:0x%04x",
|
||||
IO_EMIF_CS4CTRL1, IO_EMIF_CS4CTRL2);
|
||||
|
||||
lcd_update();
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +125,7 @@ bool __dbg_hw_info(void)
|
|||
{
|
||||
int line = 0, oldline;
|
||||
int button;
|
||||
#ifndef CREATIVE_ZVx
|
||||
#if defined(MROBE_500)
|
||||
int *address=0x0;
|
||||
#endif
|
||||
bool done=false;
|
||||
|
|
@ -57,28 +138,43 @@ bool __dbg_hw_info(void)
|
|||
|
||||
lcd_puts(0, line++, "Clock info:");
|
||||
#if LCD_WIDTH > 320
|
||||
lcd_putsf(0, line++, "IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x",
|
||||
lcd_putsf(0, line++, "IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x "
|
||||
"IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x",
|
||||
IO_CLK_PLLA, IO_CLK_PLLB, IO_CLK_SEL0, IO_CLK_SEL1);
|
||||
lcd_putsf(0, line++, "IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x",
|
||||
lcd_putsf(0, line++, "IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x "
|
||||
"IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x",
|
||||
IO_CLK_SEL2, IO_CLK_DIV0, IO_CLK_DIV1, IO_CLK_DIV2);
|
||||
lcd_putsf(0, line++, "IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x",
|
||||
lcd_putsf(0, line++, "IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x "
|
||||
"IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x",
|
||||
IO_CLK_DIV3, IO_CLK_DIV4, IO_CLK_BYP, IO_CLK_INV);
|
||||
lcd_putsf(0, line++, "IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x",
|
||||
lcd_putsf(0, line++, "IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x "
|
||||
"IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x",
|
||||
IO_CLK_MOD0, IO_CLK_MOD1, IO_CLK_MOD2, IO_CLK_LPCTL0);
|
||||
#else
|
||||
lcd_putsf(0, line++, " IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x", IO_CLK_PLLA, IO_CLK_PLLB);
|
||||
lcd_putsf(0, line++, " IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x", IO_CLK_SEL0, IO_CLK_SEL1);
|
||||
lcd_putsf(0, line++, " IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x", IO_CLK_SEL2, IO_CLK_DIV0);
|
||||
lcd_putsf(0, line++, " IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x", IO_CLK_DIV1, IO_CLK_DIV2);
|
||||
lcd_putsf(0, line++, " IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x", IO_CLK_DIV3, IO_CLK_DIV4);
|
||||
lcd_putsf(0, line++, " IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x", IO_CLK_BYP, IO_CLK_INV);
|
||||
lcd_putsf(0, line++, " IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x ", IO_CLK_MOD0, IO_CLK_MOD1);
|
||||
lcd_putsf(0, line++, " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ", IO_CLK_MOD2, IO_CLK_LPCTL0);
|
||||
lcd_puts(0, line++, "Interrupt info:");
|
||||
lcd_putsf(0, line++, " IO_INTC_EINT0: 0x%04x IO_INTC_EINT1: 0x%04x ", IO_INTC_EINT0, IO_INTC_EINT1);
|
||||
lcd_putsf(0, line++, " IO_INTC_EINT2: 0x%04x IO_INTC_IRQ0: 0x%04x ", IO_INTC_EINT2, IO_INTC_IRQ0);
|
||||
lcd_putsf(0, line++, " IO_INTC_IRQ1: 0x%04x IO_INTC_IRQ2: 0x%04x ", IO_INTC_IRQ1, IO_INTC_IRQ2);
|
||||
lcd_putsf(0, line++, " IO_CLK_PLLA: 0x%04x IO_CLK_PLLB: 0x%04x",
|
||||
IO_CLK_PLLA, IO_CLK_PLLB);
|
||||
lcd_putsf(0, line++, " IO_CLK_SEL0: 0x%04x IO_CLK_SEL1: 0x%04x",
|
||||
IO_CLK_SEL0, IO_CLK_SEL1);
|
||||
lcd_putsf(0, line++, " IO_CLK_SEL2: 0x%04x IO_CLK_DIV0: 0x%04x",
|
||||
IO_CLK_SEL2, IO_CLK_DIV0);
|
||||
lcd_putsf(0, line++, " IO_CLK_DIV1: 0x%04x IO_CLK_DIV2: 0x%04x",
|
||||
IO_CLK_DIV1, IO_CLK_DIV2);
|
||||
lcd_putsf(0, line++, " IO_CLK_DIV3: 0x%04x IO_CLK_DIV4: 0x%04x",
|
||||
IO_CLK_DIV3, IO_CLK_DIV4);
|
||||
lcd_putsf(0, line++, " IO_CLK_BYP : 0x%04x IO_CLK_INV : 0x%04x",
|
||||
IO_CLK_BYP, IO_CLK_INV);
|
||||
lcd_putsf(0, line++, " IO_CLK_MOD0: 0x%04x IO_CLK_MOD1: 0x%04x ",
|
||||
IO_CLK_MOD0, IO_CLK_MOD1);
|
||||
lcd_putsf(0, line++, " IO_CLK_MOD2: 0x%04x IO_CLK_LPCTL0: 0x%04x ",
|
||||
IO_CLK_MOD2, IO_CLK_LPCTL0);
|
||||
#endif
|
||||
lcd_puts(0, line++, "Interrupt info:");
|
||||
lcd_putsf(0, line++, " IO_INTC_EINT0: 0x%04x IO_INTC_EINT1: 0x%04x ",
|
||||
IO_INTC_EINT0, IO_INTC_EINT1);
|
||||
lcd_putsf(0, line++, " IO_INTC_EINT2: 0x%04x IO_INTC_IRQ0: 0x%04x ",
|
||||
IO_INTC_EINT2, IO_INTC_IRQ0);
|
||||
lcd_putsf(0, line++, " IO_INTC_IRQ1: 0x%04x IO_INTC_IRQ2: 0x%04x ",
|
||||
IO_INTC_IRQ1, IO_INTC_IRQ2);
|
||||
|
||||
lcd_puts(0, line++, "Board revision:");
|
||||
switch (IO_BUSC_REVR) {
|
||||
|
|
@ -92,14 +188,14 @@ bool __dbg_hw_info(void)
|
|||
lcd_puts(0, line++, " Unknown DM320 Chip ID");
|
||||
}
|
||||
|
||||
#ifndef CREATIVE_ZVx
|
||||
#if defined(MROBE_500)
|
||||
line++;
|
||||
#endif
|
||||
oldline=line;
|
||||
while(!done)
|
||||
{
|
||||
line = oldline;
|
||||
#ifndef CREATIVE_ZVx
|
||||
#if defined(MROBE_500)
|
||||
button = button_get(false);
|
||||
button&=~BUTTON_REPEAT;
|
||||
if (button == BUTTON_POWER)
|
||||
|
|
@ -113,22 +209,23 @@ bool __dbg_hw_info(void)
|
|||
else if (button==BUTTON_RC_REW)
|
||||
address-=0x800;
|
||||
#else
|
||||
button = button_get(false);
|
||||
if(button & BUTTON_POWER)
|
||||
done = true;
|
||||
else if(button & BUTTON_LEFT)
|
||||
lcd_set_direct_fb(false);
|
||||
else if(button & BUTTON_RIGHT)
|
||||
lcd_set_direct_fb(true);
|
||||
|
||||
lcd_puts(0, line++, "LCD info:");
|
||||
lcd_putsf(0, line++, " LCD direct FB access? %s", (lcd_get_direct_fb() ? "yes" : "no"));
|
||||
line++;
|
||||
button = button_get(false);
|
||||
if(button & BUTTON_POWER)
|
||||
done = true;
|
||||
else if(button & BUTTON_LEFT)
|
||||
lcd_set_direct_fb(false);
|
||||
else if(button & BUTTON_RIGHT)
|
||||
lcd_set_direct_fb(true);
|
||||
|
||||
lcd_puts(0, line++, "LCD info:");
|
||||
lcd_putsf(0, line++, " LCD direct FB access? %s",
|
||||
(lcd_get_direct_fb() ? "yes" : "no"));
|
||||
line++;
|
||||
#endif
|
||||
lcd_puts(0, line++, "[Rockbox info]");
|
||||
lcd_putsf(0, line++, "current tick: %08x Seconds running: %08d",
|
||||
(unsigned int)current_tick, (unsigned int)current_tick/100);
|
||||
#ifndef CREATIVE_ZVx
|
||||
#if defined(MROBE_500)
|
||||
lcd_putsf(0, line++, "Address: 0x%08x Data: 0x%08x",
|
||||
(unsigned int)address, *address);
|
||||
lcd_putsf(0, line++, "Address: 0x%08x Data: 0x%08x",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue