LEDC Output Value - Register Access

lm_mrsh
Posts: 1
Joined: Mon Dec 02, 2019 11:14 am

LEDC Output Value - Register Access

Postby lm_mrsh » Mon Dec 02, 2019 11:54 am

Hi,

In my project I need to be able to read the current output state of a PWM pin (configured using LEDC). I've looked through the datasheet and can't seem to find a register which holds this value.

I'd like to avoid a digitalRead as I'm running a time critical loop, and want this to be programmatically as efficient as possible. I've also had very mixed results with using a hardware interrupt, which triggers spuriously when the PWM signal is at 0 V. As such, directly accessing the value within the registers of the device is preferable to looping the signal back round to an input.

Does anybody know if this is possible?

Thanks in advance.

Who is online

Users browsing this forum: No registered users and 7 guests