2021-01-26 07:50 AM
hi i'm using the stm32h750 and in it using the baud rate of 500000 well i want ot go higher but everytime i increase the baud rate there is some charachters dropped or missing in the final received message i tried DMA its worst not filling the buffer
my question is this i'm using HAL can i have high baud rates and use DMA circular to read from the UART
2021-01-26 07:57 AM
Do you have any higher priority interrupts? Try disabling those and see if the problem persists. This at least gives a place to start looking if it does.
Where you respond to the DMA are you using any non-static variables you might drop if interrupted by a higher priority?
BT
2021-01-26 08:01 AM
>> i'm using HAL can i have high baud rates and use DMA circular to read from the UART
Yes, but you don't have too.
The H7 should support a FIFO also, I'd expect 500 kbaud would be capable of working under interrupt.
The HAL adds more complexity than benefit.
Consider if your processing of data is the issue, having long running or blocking code should be avoided under interrupt/callback. Queue the data and manage it in another thread.
2021-01-27 04:22 AM
i tried with a new projects using only uart same problem
2021-01-27 04:23 AM
the processing is getting the message and verifying if there is an EOL code to start working on processing the message
2021-01-27 05:09 AM
Here we run two projects on H753, reading at baudrate 921600, with RS422 PHY.
One with circular DMA based on Tilen Majarle's example, another with simple polling (but not using HAL driver either).
-- pa
2021-01-27 05:19 AM
"the processing is getting the message and verifying if there is an EOL code to start working on processing the message"
are you trying to do that per-character in the receive interrupt?
To check whether the problem lies in the baud rate itself, or the rate at which bytes can be processed - try inserting a delay between bytes at your sending end.
2021-01-27 05:23 AM
What is your stm32h750 communicating with?
How are they connected?
Have you used an oscilloscope to verify that the signals are well-formed, at the correct baud rate, etc?
Is your code checking for receiver errors - overruns, framing, etc?
"some charachters dropped or missing in the final received message"
It's not clear where this is happening: is this in your stm32h750, or at whatever other thing your stm32h750 connected to?
2021-01-27 07:03 AM
hi Pavel i'm really new to Stm32 and c programming in general HAL is really helping me now i saw Tilen Majarle's example but couldn't implement it i tried it but no luck
2021-01-27 07:05 AM
hi Andrew yes i'm doing it per-character in the receive interrupt because the RxCpltCallback doesnt fire until pre defined numer of bytes are received and i have multiple messages with different lengths