Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG
Hi Team,
I am working on the MSPM0G3507 MCU and trying to synchronize ADC conversion with a PWM signal.
My requirement is as follows:
-
PWM frequency: 100 kHz
-
I need to sample 10 ADC values within one PWM cycle
-
This means I need 1 ADC conversion every 1 µs
-
All samples must be synchronized to the PWM cycle (same phase every cycle)
What I have tried:
-
Configured PWM as event publisher
-
Configured Timer as subscriber to PWM
-
Configured Timer as publisher
-
Configured ADC as subscriber to Timer
So the chain is:
PWM → Timer → ADC
Issues:
-
ADC conversions are not properly synchronized with PWM
-
Samples are drifting across multiple PWM cycles, or
-
Not restarting correctly on every PWM edge
-
I am not getting consistent 10 samples within a single PWM period
-
-
I am also unable to set PWM duty cycle to exactly 50% at 100 kHz frequency
Expectation:
-
On every PWM edge:
-
Timer should start/reset
-
ADC should take exactly 10 samples at 1 µs intervals
-
Sampling should repeat identically every PWM cycle
-
Questions:
-
What is the correct configuration to achieve this synchronization?
-
Why might PWM duty cycle not be achieving an exact 50% at 100 kHz?
Any example configuration or reference project would be very helpful.
Thanks in advance!
Best regards,