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.

AMIC110: UART2 open causes an exception

Part Number: AMIC110

Hi Sir/Madam,

I am developing a project with UART module of AMIC110.

Now URAT0, UART1, and UART3 are already configured and work well.

The issue I have is UART2.

The console always shows CortxA8: Unhandled ADP_Stopped exception 0x801F9970, when the program executes the line of uart_handler = UART_open(2, &params);

UART_open() is in the line 16 of the attached code blow.

Because the configuration I did for UART2 is the same as for UART0/1/3, I am confused why UART2 cannot open, even it makes the system crash during opening.

After opening UART2, I need UART_write() and UART_read() to send and receive the data to and from other chip.

Does it have any solution to open UART2 successfully? Then send and receive data throught this UART2.

void UART2_Init(uint32_t baud, uint32_t timeout)
{
    UART_HwAttrs uart_cfg_cfgtool;
    UART_Params params;
  
    UART_socGetInitCfg(UART_FOR_FSOE, &uart_cfg_cfgtool);
    UART_socSetInitCfg(UART_FOR_FSOE, &uart_cfg_cfgtool);
    UART_Params_init(&params);
    params.baudRate = baud;
    params.stopBits = UART_STOP_ONE;
    params.readDataMode = UART_DATA_BINARY;
    params.writeDataMode = UART_DATA_BINARY;
    params.readReturnMode = UART_RETURN_FULL;
    params.readEcho = UART_ECHO_OFF;
    params.readTimeout = timeout;
    uart_handler = UART_open(2, &params);
    if(uart_handler == NULL)
    {
        printf("uart2 open fail");
    }
}

These are the library version I use.

Look forward to hearing your advice. Thanks a lot.

Kind regards,

Sandro