Implementing Interference-Free UART Communication in a Zephyr-based BLE Mesh

Hi everyone.

I am running a BLE mesh stack in my Zephyr-based application and need to interface with another device using UART.

How can I implement UART communication to avoid any interference with the BLE mesh stack?

tell me if its correct or if there is any other solution, I have heard that using DMA for UART communication can help ensure that the BLE mesh stack runs smoothly, 

from this assumption I am unsure whether to use the UARTE driver with EasyDMA or the UART driver with the Asynchronous API using DMA.

Can you help me understand which driver and API functions are best suited for my hardware platform ?

- using nrf52840 and ncs. 

Thanks Cedric.

Parents
  • Hello Cedric,

    How can I implement UART communication to avoid any interference with the BLE mesh stack?

    This shouldn't be a real problem either way, as these things are handled by threads of different priorities - what is time critical gets priority. Though with UARTE you get EasyDMA which would make sure that the CPU doesn't get interrupted. If you want DMA, which I assume you do, go for UARTE. One negative side of DMA would be a slightly higher power consumption, but as you're doing Mesh I assume that is of no big concern.

    If you are getting started I should mention that you should have a look at the DevAcademy. There is a section on UART there as well!

    Regards,

    Elfving

Reply
  • Hello Cedric,

    How can I implement UART communication to avoid any interference with the BLE mesh stack?

    This shouldn't be a real problem either way, as these things are handled by threads of different priorities - what is time critical gets priority. Though with UARTE you get EasyDMA which would make sure that the CPU doesn't get interrupted. If you want DMA, which I assume you do, go for UARTE. One negative side of DMA would be a slightly higher power consumption, but as you're doing Mesh I assume that is of no big concern.

    If you are getting started I should mention that you should have a look at the DevAcademy. There is a section on UART there as well!

    Regards,

    Elfving

Children
Related