cancel
Showing results for 
Search instead for 
Did you mean: 

EVSPIN32G4NH - opamp ADC setting

Sheng123
Associate

Dear community 

I would like to ask regarding ADC raw value for current sensing in STSPIN32G4. As we can see on below image the raw value of ADC1 CH3 and ADC2 CH12 is always in range of few hundreds. FYI, the motor is in rotating mode. We can see from the PWM duty cycles, it is changing every time.

When measured using multimeter for phase current W, the current is always alternate from +3.5A to -1.2A which make sense. but the ADC raw values keep in hundreds. I was expecting it alternate from > 2048and < 2048.

ADC resolution is 2^12.

2048 = 0A // >2048 = +A //2048 = -A

image-20250212-085645.png
Can you help to advise on this weird raw ADC values? below is my multi-channel ADC1 settings.
image-20250212-090058.png
We have also tried changing the ADC alignment to right-aligned, but instead, the values dropped to only two digits.
Sheng123_0-1739353803676.png

We have attached our ADC.c file. Could you kindly point us in the right direction?
Any guidance would be greatly appreciated.

 

many thanks!!!

0 REPLIES 0