This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Issue on UART initialization code

Other Parts Discussed in Thread: AM3352

Hi all,

SOC: AM3352

Version:AM335X_ StarterWare_02_00_01_01
 (Currently using)

Now, I run application Present in /examples/DMcounter/dmtimercounter.c,  in this file it's call the consoleutils() function.

- the Consoleutils() function present in utils/consoleutils.c file, again it's call the UARTStdioInit() function

- the UARTStdioInit() function present in utils/Uartstdio.c, again it's calling the Three functions,

1-UART0ModuleclkConfig()

2-UARTPinMuxsetup()

3-UARTStdioInitExpclk()

these 1st and 2nd functions present in the platform/evmam335x/uart.c and 3rd one in platform/evmam335x/uartconsole.c

- the 1st and 2nd functions initialization works perfectly, in 3rd function again calling  Other functions,

- the one of the function is UARTModulereset(unsigned int base Add)

UARTModulereset(unsigned int base Add)

{

/* Performing software reset of the module */

HWREG(baseadd+UART_Sysc) |=(UART_Sysc_SOFTRESET);

/* Wait untill the process of module reset is complete */

while(!(HWREG(baseadd+UART_Syss)&UART_Syss_RESETDONE));

}

the above function present in /derivers/uart_irda_cir.c file.

In this function first instruction will reset the serial module

and in second instruction it is waiting for the module to perfect Reset till this time it is waiting.

When I run the sample application it is stack at this point Module is not come out after reset.

If I comments this while loop system works fine.

So can any one provide me the solution of this issue.

Why application stop at this point.

Please guide me, How resolve UARTModulereset() function  issue.

regards,

Vamsi.

  • Please reply any One, Now i am working on this Project.
  • Vamsi,

    If I understand correctly, the UART is not coming out of reset. Do you see the SYSC Register, bit 1 getting set?
    I also noticed that you are on an older version. Do you need to stick to stick to this version?

    Lali
  • Hi Lalindra,

    UARTModulereset(unsigned int base Add)

    {

    /* Performing software reset of the module */

    consoleutilsprintf("Module is reset on sysc register\n");

    HWREG(baseadd+UART_Sysc) |=(UART_SYSC_SOFTRESET);

    /* Wait untill the process of module reset is complete */

    consoleutilsprintf("Module is reset completed and Checking status register\n");

    while(!(HWREG(baseadd+UART_Syss)&UART_SYSC_RESETDONE));

    }

    - this is the actual code, I used to print some prints in the Code for debug,.

    - with the Help of CCS i am debug this boot_ti.bin file, in console i am getting

        Module reset on SYSC register, after that it's stops.

    - My second print it is Not printing, I set the SYSC  1st Bit to UART_SYSC_SOFTRESET= 0x00000002.

    - the 2nd statement is Check the H/w Reset or not in SYSS register.

    - Now, i am getting Issue Here,

    SOC: AM3352

    Version: 02.00.01.01

      Please Help me to resolve this Issue.

     

    Regards,

    Vamsi.