2025-03-27 11:38 PM
"I followed along with this video, but I have some questions. How can I correctly retrieve the ADC array values via UART communication? And why is the UART value coming out as garbage in this video?"
https://www.youtube.com/watch?v=_hX6pN2jgYM
I think it's a clock issue. How can I fix this?
Solved! Go to Solution.
2025-04-11 9:28 AM - edited 2025-04-11 9:29 AM
Hello @dlagyals,
** How to Retrieve ADC Array Values via UART Communication:
In the mentioned video, the part discussing ADC and UART buffers is between 2:30 and 3:16 minutes.
The destination memory is a table in RAM (buffer), and transfers are done by 2 DMA channels:
Recommendation: Use half-buffer interrupts.
There is an example showing how to manage the buffer half-by-half in the STM32U5 FW package: ...\Projects\NUCLEO-U575ZI-Q\Examples_LL\ADC\ADC_SingleConversion_TriggerTimer_DMA_Init
** Why is the UART Value Coming Out as Garbage:
ADC conversion data are digital values depending on the analog voltage level (coded on ADC resolution from 6 to 14 bits on STM32U5).
Serial port terminals display characters coded in ASCII, which do not match the digital values.
To display ADC conversions on the terminal:
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH
2025-04-11 9:28 AM - edited 2025-04-11 9:29 AM
Hello @dlagyals,
** How to Retrieve ADC Array Values via UART Communication:
In the mentioned video, the part discussing ADC and UART buffers is between 2:30 and 3:16 minutes.
The destination memory is a table in RAM (buffer), and transfers are done by 2 DMA channels:
Recommendation: Use half-buffer interrupts.
There is an example showing how to manage the buffer half-by-half in the STM32U5 FW package: ...\Projects\NUCLEO-U575ZI-Q\Examples_LL\ADC\ADC_SingleConversion_TriggerTimer_DMA_Init
** Why is the UART Value Coming Out as Garbage:
ADC conversion data are digital values depending on the analog voltage level (coded on ADC resolution from 6 to 14 bits on STM32U5).
Serial port terminals display characters coded in ASCII, which do not match the digital values.
To display ADC conversions on the terminal:
I hope my answer has helped you. When your question is answered, please select this topic as solution that answered you, it will help others find that answer faster.
Thanks for your contribution.
Dor_RH