"APP_UART_COMMUNICATION_ERROR" for nRF52832

Hi guys! I'm a beginner of nRF52832, and I met an issue as the topic said.

When I init the UART module, it will cause an "APP_UART_COMMUNICATION_ERROR", and the error code is 4 "No Memory For Operation".

#define UART_TX_BUF_SIZE    256
#define UART_RX_BUF_SIZE    256

void uart_config(void)
{
    uint32_t err_code = NRF_SUCCESS;
    
    const app_uart_comm_params_t comm_params = {
        RX_PIN_NUMBER,  //8
        TX_PIN_NUMBER,  //6
        RTS_PIN_NUMBER, //7
        CTS_PIN_NUMBER, //5
        APP_UART_FLOW_CONTROL_DISABLED,
        false,
        NRF_UART_BAUDRATE_115200
    };
    
    APP_UART_FIFO_INIT(&comm_params,
                        UART_RX_BUF_SIZE,   //256
                        UART_TX_BUF_SIZE,   //256
                        uart_error_handle,
                        APP_IRQ_PRIORITY_LOWEST,
                        err_code);
    
    APP_ERROR_CHECK(err_code);
}

What can I do to fix it?

BTW, I'm using my own board, and coding on Keil uVision 5, and the RX_PIN has already set to PULLUP.

If you need more info, please let me know, thanks!

Parents Reply Children
Related