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.

RTOS/AM3352: RTOS/AM3352 call UART_open() API crash

Part Number: AM3352

Tool/software: TI-RTOS

Dear sir:

    I designed a example for test uart5,I modify xxx_pinmux_data.c and xxx_pinmux.c,

on xxx_pinmux_data.c,I add :

static pinmuxPerCfg_t gUart5PinCfg[] =
{
{
/* MyUART1 -> uart5_rxd -> V4 */
PIN_LCD_DATA14, 0, \
( \
PIN_MODE(4) | \
((PIN_RX_ACTIVE) & (~PIN_PULL_UD_EN & ~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyUART1 -> uart5_txd -> H18 */
PIN_RMII1_REFCLK, 0, \
( \
PIN_MODE(3) | \
((0x38) & (~PIN_PULL_UD_EN & ~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxPerCfg_t gUart0PinCfg[] =
{
{
/* UART 0 -> uart0_rxd -> E15 */
PIN_UART0_RXD, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_TYPE_SEL | PIN_RX_ACTIVE) & (~PIN_PULL_UD_EN)) \
) \
},
{
/* UART 0 -> uart0_txd -> E16 */
PIN_UART0_TXD, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_TYPE_SEL) & (~PIN_PULL_UD_EN & ~PIN_RX_ACTIVE)) \
) \
},
{PINMUX_INVALID_PIN}
};

static pinmuxModuleCfg_t gUartPinCfg[] =
{
{0, TRUE, gUart0PinCfg},
{5, TRUE, gUart5PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};

and on xxx_pinmux.c,I modify on function Board_pinmuxConfig :

status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 0U, NULL);

if(S_PASS == status)
{
status = PINMUXModuleConfig(CHIPDB_MOD_ID_UART, 5U, NULL);
}

and then I gmake the borad_lib.

after this,on my test project,

I use below methord to call UART_open();

UART_HwAttrs uart_cfg;
UART_Params params;
UART_Handle uart_handle_5 = NULL;

UART_socGetInitCfg (5, &uart_cfg);
UART_socSetInitCfg (5, &uart_cfg);

UART_Params_init(&params);

uart_handle_5 = UART_open(5,&params);

when execut to UART_open();

the ccs tips:

CortxA8: Unhandled ADP_Stopped exception 0x80024890

I don't know what cause this issue,please help me to resolve .

thanks!

  • Can you also attached the .cfg file that you are using for this RTOS application. Have you setup the MMU for the UART registers.

    What hardware platform are you running this on. Have you compare the .cfg file in your example with the .cfg file in Processor SDK RTOS. Check the peripheralAttr setting for MMU for Cortex A8 in the UART LLD examples/test for TI evaluation HW.

    Regards,
    Rahul
  • Dear Rahul

         Yesterday,I found I forget init the UART5 clock in board_init,when I add it ,it run correctly,thanks!