This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Uarte and ble

According to the description of S132_SDS_v5.0 on page 82, when the establishment of connection, in accordance with the BLE protocol, softdevice will be interrupted frequent send connection event, to ensure that the connection is not broken. (Each tisr (0) is greater than 10us)

In other words, if this time uart baud rate is 1M (each byte takes about 10us), which is what I need, it will lead to the loss of data, and this situation, I have two solutions:

1, DMA buffer to receive, to avoid softdevice timing-critical occupation of cpu lead to loss of bytes

2, hardware flow control, is it will make the RTS pin frequently switch level?

3, the above two cases at the same time use

Is there any other choice?

Parents
  • Hi,

    The UARTE peripheral will use EasyDMA for directly accessing RAM buffer. You can also use legacy UART peripheral on nRF52832, without EasyDMA. When using together with softdevice, I would highly recommend that you use the EasyDMA feature to avoid data loss. HWFC should also be used with such high baud rate to avoid overflow.

    Best regards,

    Jørgen

  • UART_RX_BUF_SIZE is not related to the UART peripheral buffer, but is used to control the size of the RX FIFO buffer used by app_uart library. The library will push/get bytes to/from the FIFOs when needed. The FIFOs will be transmitted/filled by the UART peripheral "in the background".

    As described in the UARTE peripheral documentation, you are able to receive up to 4 bytes after STOPRX task:

    The UARTE is able to receive up to four bytes after the STOPRX task has been triggered as long as these are sent in succession immediately after the RTS signal is deactivated. This is possible because after the RTS is deactivated the UARTE is able to receive bytes for an extended period equal to the time it takes to send 4 bytes on the configured baud rate.

Reply
  • UART_RX_BUF_SIZE is not related to the UART peripheral buffer, but is used to control the size of the RX FIFO buffer used by app_uart library. The library will push/get bytes to/from the FIFOs when needed. The FIFOs will be transmitted/filled by the UART peripheral "in the background".

    As described in the UARTE peripheral documentation, you are able to receive up to 4 bytes after STOPRX task:

    The UARTE is able to receive up to four bytes after the STOPRX task has been triggered as long as these are sent in succession immediately after the RTS signal is deactivated. This is possible because after the RTS is deactivated the UARTE is able to receive bytes for an extended period equal to the time it takes to send 4 bytes on the configured baud rate.

Children
No Data
Related