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

HowTo use UARTE 250000 8N2 plus TxBreak for DMX512 protocol

I'd like to use a nRF52840's UARTE0 as interface for a DMX512 controler.
For that I'd need to set the interface at 250000 baud with 8N2. But I can't see how to configure 2 stop bits via nrf_uarte_configure(). This function allows to control HWFC and parity but not the number of stop bits, why?
What can I use instead?

In addition the DMX512 protocol would require a break (~100µs LOW, ~12µs HIGH) as lead-in for the following data train (up to 513 bytes).

Parents
  • Hi,

    nRF52840 doesn't support two stop bits by hardware. You can ensure two stop bits by using an UART without EasyDMA, sending each new character at timer interrupt. Two stop bits correspond to 44 usec that is 11 bits (1 start + 8 data + 2 stop).

    In addition the DMX512 protocol would require a break (~100µs LOW, ~12µs HIGH) as lead-in for the following data train (up to 513 bytes).

    Just disable UART temporary and send it to TX line as usual GPIO pin.

Reply
  • Hi,

    nRF52840 doesn't support two stop bits by hardware. You can ensure two stop bits by using an UART without EasyDMA, sending each new character at timer interrupt. Two stop bits correspond to 44 usec that is 11 bits (1 start + 8 data + 2 stop).

    In addition the DMX512 protocol would require a break (~100µs LOW, ~12µs HIGH) as lead-in for the following data train (up to 513 bytes).

    Just disable UART temporary and send it to TX line as usual GPIO pin.

Children
Related