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

I am trying to do DMX512 (protocol), I hope to help me, time is very urgent

Hi,

DMX512 protocol is USITT(United States Institute for Theater Technology)Prescribed agreement

I want to follow this agreement to design

============ DMX512 protocol:

Baud:250K

Break:88us

MAB:8us

============ Data frame contains:

Start:1 bit

Data:8 bit

Stop:2 bit

Parity:None

I know that this design will still have errors.

I hope to give me some help, the project is urgent, thanks

Another stop bit need 2 bit, is it necessary to operate directly with registers?

(But the SDK is full of library operations?)

Parents
  • Hi,

    Only UARTE peripheral support two stop bits, and this is only supported on nRF52840 and nRF52810 ICs. Unfortunatelu, there seems to be no support for setting this in the drivers. 

    You can set two stop bits by writing the register directly after initializing the UARTE peripheral:

    NRF_UARTE0->CONFIG |= (UARTE_CONFIG_STOP_Two << UARTE_CONFIG_STOP_Pos);

    The UARTE peripheral have EasyDMA support, meaning transfers can happen in the background while CPU is busy handling BLE/softdevice events. If you frequently need to handle UART events with strict timing requirements, this will not work together with the softdevice.

    Best regards,
    Jørgen

Reply
  • Hi,

    Only UARTE peripheral support two stop bits, and this is only supported on nRF52840 and nRF52810 ICs. Unfortunatelu, there seems to be no support for setting this in the drivers. 

    You can set two stop bits by writing the register directly after initializing the UARTE peripheral:

    NRF_UARTE0->CONFIG |= (UARTE_CONFIG_STOP_Two << UARTE_CONFIG_STOP_Pos);

    The UARTE peripheral have EasyDMA support, meaning transfers can happen in the background while CPU is busy handling BLE/softdevice events. If you frequently need to handle UART events with strict timing requirements, this will not work together with the softdevice.

    Best regards,
    Jørgen

Children
Related