2025-05-28 12:47 AM
I'm working on a DMX communication project using an STM32 microcontroller (e.g., STM32G030K8T6TR).
I have successfully implemented DMX data transmission.
For reception, I have enabled USART RX interrupt using __HAL_UART_ENABLE_IT
I’m using a keyboard to send values, for example setting channel 1 to 90, but in my code, I don’t receive 90 – I get random or incorrect values in the buffer.
What I have verified:
Baud rate is set to 250000 bps (DMX standard).
USART settings: 8N2 (8 data bits, no parity, 2 stop bits).
I’m watching the value stored in dmx_data[0] using live expressions in STM32CubeIDE.
Question:
Why am I receiving incorrect data?
Could it be due to incorrect USART configuration, timing issues, or missing break detection in the DMX frame?
How can I properly extract and identify channel data from the DMX stream (e.g., value for channel 1 when set to 90)?
Any help or examples on proper DMX receive implementation would be appreciated! Here I attached my code.