ledc - Test free timer

Arnaud
Posts: 1
Joined: Sat Feb 05, 2022 3:18 pm

ledc - Test free timer

Postby Arnaud » Sat Feb 05, 2022 4:14 pm

Hello,

I'm currently working on an Arduino library use to drive DC motors via ledc PWM signals.
Durring ledc initialization, I need to test if a timer is already used or not (i.e. by another lib) to implement an automatic timer managerial. My idea was to use the ledc_get_freq() function to achieve this (return 0 if not set) but, unfortunately, it seems that using this one on a not configured timer crash and reboot my ESP32.

I did a lot of research but don't find a way to solve my problem. Could someone give me some advice about this?

Many thaks in advance,

Sincerely,

Arnaud

Who is online

Users browsing this forum: No registered users and 75 guests