AnsweredAssumed Answered

Got problem on using mx28 ODBS

Question asked by 9crk zhou on Jan 19, 2014
Latest reply on Jan 22, 2014 by 9crk zhou

I'v downloaded the ARM-EABI compiler, and I succeed in compiling the odbs package.

 

While, I meet a problem on the UART.

it seems not recive any input.

this is all I got.

********************************************************

     Diagnostics Suite (1.0) on i.MX28 evk

     Build: Jan 20 2014, 11:28:52

     Freescale Semiconductor, Inc.

********************************************************

 

Please input char to test UART input function, 'X' exit this test

Please enter x or X to confirm

After this, nothing can be done.

 

The defalut uart is in BANK1 26+27, my board is BANK3 2+3, I just changed the function in /src/driver/uart/stmp_uart/stmp_uart.c

color in red is what I changed.

void init_debug_uart(struct hw_module *uart, u32 baud)
{
    u32 val;

 

    stmp_debug_uart = (volatile struct stmp_serial *)uart->base;
    writel(0xa0, HW_PINCTRL_MUXSEL6_SET);
    writel(0x50, HW_PINCTRL_MUXSEL6_CLR);
    //writel(0xf0000, HW_PINCTRL_MUXSEL7_SET);    /*BANK3_PIN25 BANK3_PIN24 to GPIO */

 

    /* check clocks */
    if ((readl(CLKCTRL_XTAL_ADDR) & 0x80000000))
        writel(0x80000000, CLKCTRL_XTAL_CLR_ADDR);

......

 

the DBUG UART just not recive the input, what's the problem?

I found it stoped in here:

char receive_char(void)

{

    // If receive fifo is empty, return false

    if (stmp_debug_uart->HW_UARTDBGFR & (1 << 4))

        return 0xFF;

    return (u8) (stmp_debug_uart->HW_UARTDBGDR & 0xFF);

}

So I use the UART printed the stmp_debug_uart->HW_UARTDBGFR  and I found the value is 111001

RI TXFE RXFF TXFF RXFE BUSY DCD DSR CTS

0   0       0        1      1        1        0      0      1

 

I have no idea how to solve this problem , any help wil be grateful...

Outcomes