nRF52840 UART send more than 256 bytes

I'm sending some data from nRF52840 to another device through wired UART. When data is less than 256-byte long, it works fine. But when it's larger than 256 bytes, I get ERROR 4 [NRF_ERROR_NO_MEM]. I have already changed UART_TX_BUF_SIZE to 1024 in APP_UART_FIFO_INIT. Is there anything else I should change? Thanks

Parents Reply
  • What I meant to suggest was that you increase the TX buffer size even further, e.g., from 1024 to 2048 bytes. This is to help narrow down the problem.

    The issue is guaranteed to happen when the data size is 257 bytes, but fine when the data size is 255 bytes. I assume the difference of 2 bytes won't have such huge impact?

    Are you sending just one packet of 257 bytes when the error occurs? Can you post the relevant code here?

Children
Related