2026-02-17 4:11 AM - last edited on 2026-02-17 4:16 AM by Andrew Neil
I am using ADC + DMA + USART1 + Timer in STM32 IDE in a setup consisting of:
Motor → Sensors → MCU (STM32N6) → PC
I am capturing the signal received at the serial port using NanoEdge AI. I have shared screenshots of:
The actual current waveform observed on the oscilloscope
The data received through the STM32N6 MCU
My doubt is:
Is there anything inside the MCU or ADC that could suppress or distort the natural sinusoidal shape of the current waveform?
Note:
I have converted ADC values to actual current values using a 3.3V reference.
I have removed the sensor bias.
I have properly accounted for sensor gain.
I would like to confirm whether the MCU/ADC processing could be affecting the waveform shape
Edited to place the images in the post:
Solved! Go to Solution.
2026-02-17 4:20 AM
Please use your scope's trace capture facility - it will give much better results than photographing the screen!
@chanchal94 wrote:Is there anything inside the MCU or ADC that could suppress or distort the natural sinusoidal shape of the current waveform?
You need to set an appropriate sample rate!
Your graph shows that you are only sampling about once in each half-cycle ...
2026-02-17 4:20 AM
Please use your scope's trace capture facility - it will give much better results than photographing the screen!
@chanchal94 wrote:Is there anything inside the MCU or ADC that could suppress or distort the natural sinusoidal shape of the current waveform?
You need to set an appropriate sample rate!
Your graph shows that you are only sampling about once in each half-cycle ...
2026-02-22 9:03 PM
Thank you! I got the solution :)
2026-02-22 11:12 PM
@chanchal94 we're always happy if the solution is shared for the next person running across the same problem.
P.S.: ADC data over UART: people often forget / oversee that the UART's baud rate is not high enough for ADC data.
2026-02-23 1:26 AM
My baud rate was okay, it was the timer issue, I checked it again as @Andrew Neil pointed out about sampling rate, I found out baud rate+ timer settings should be correct for this. My timer setting was a bit distorted.