none
How to Change default debug Console UART0 to UART1 RRS feed

  • General discussion

  • Hello Friends,

    I want to change the default(UART0) console to UART1... What changes I have to made and where??

    Upto so far, I have made changes under BOOTLOADER/STUBS

    debugserial.c

    VOID OEMInitDebugSerial( )

    {

    ....

    .....

       

    if (BSPGetDebugUARTConfig()->dev == AM_DEVICE_UART1){
    s_pUartRegs = OALPAtoUA(AM33X_UART1_REGS_PA);

    }

    VOID OEMDeinitDebugSerial(){

    ......

    ......

    EnableDeviceClocks(AM_DEVICE_UART1, FALSE);

    }

    bsp_bootstubs.c

    BOOL EnableDeviceClocks( UINT devId, BOOL bEnable)

    {

    .....

    .....

    case AM_DEVICE_UART1:
                pModReg = &pPrcmRegs->CM_WKUP_UART1_CLKCTRL;            
                break;


    }

    am33x_prcm.h

    typedef struct {

    ......

    ......

    ////////REG32 CM_WKUP_UART0_CLKCTRL; // 0x04B4
    REG32 CM_WKUP_UART1_CLKCTRL; // 0x04B4

    } AM33X_PRCM_REGS;

    and prcm_device.h

    DeviceLookupEntry s_rgDeviceLookupTable[] =
    {

    ......

    ......

    ///*/*/*/*{ POWERDOMAIN_WKUP, {1,{kUART0_GFCLK}},                 {1,{kL4_WKUP_GCLK}},    0, PRCM_OFS(CM_WKUP_UART0_CLKCTRL),*/*/*/*/         IDLEST_MASK, 0},//AM_DEVICE_UART0,               /* 10 */
    { POWERDOMAIN_WKUP, {1,{kUART1_GFCLK}},                 {1,{kL4_WKUP_GCLK}},    0, PRCM_OFS(CM_WKUP_UART1_CLKCTRL), 


    }

    and am33x_clocks.h

    typedef enum {

    ......

    ......

        //////////kUART0_GFCLK,           //k192MHZ_CLK
    kUART1_GFCLK,           //k192MHZ_CLK

    } SourceClock_e;

    Anywhere I have to change???




    • Edited by salathia Thursday, February 27, 2014 10:36 AM
    Thursday, February 27, 2014 6:30 AM

All replies

  • If i am not mistaken you can do that by adding the /c parameter with loadcepc. (X stands for the serial port, /c:0 disables serial debug output)

    loadcepc /c:X nk.bin



    Tuesday, March 4, 2014 9:07 AM