Measure the magnitude of the PWM signal with ADC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Measure the magnitude of the PWM signal with ADC

426 Views
kein
Contributor I

 Hi, first of all, I'm using IMX6UL.

 I want to measure the Max value of the PWM with ADC.

The PWM signal I want to measure has 1kHz and a duty of 5%(50us in time).

Currently, the value of the PWM signal is read by polling from the Sysfile.

/sys/devices/platform/soc/2100000.bus/2198000.adc/iio\:device0/in_voltage2_raw
 
However, it isn't possible to read the maximum voltage magnitude of the 5% duty PWM signal in this way (For higher duty cycles, the maximum value can be measured.)
 
Using a thread, even if the value is read about 4000 times per second, the maximum voltage value of the 5% duty PWM signal can't be read.

It seems to be solved by improving the performance of the ADC(sampling frequency, ADC conversion time, ...) or by using the method to operate the ADC by receiving the PWM rising edge interrupt signal. Is there a way to use these or other solutions?

Best Regards.

Tags (4)
0 Kudos
0 Replies