I have a test system application that requires generating several different frequencies.
When use the ledcsetup(channel, freq, resolution) command if the channel is ‘0’ or ‘1’ the frequency is the same for both channels. Further checking sets the same frequency for both channels 2/3, 4/5 etc. It seems that the lower bit vaule in channel does not distinguish different frequencies.
Is there any more detail on the ledcsetup function?
Many thanks.
Hi Neville.
I’ve tested that and it seems that channel 0 and 1 share the same frequency, as well as 2 and 3, and 4 and 5.
I don’t know if it has do with the fact that there are 16 hardware channels to produce PWM, but only 8 timers. See what others are discussion about that here: https://github.com/espressif/arduino-esp32/issues/1256
More information about the ledcsetup function code: https://github.com/espressif/arduino-esp32/blob/2fd39b1aff1c1f2be60bbd9b5fbd9c88638b0fcc/cores/esp32/esp32-hal-ledc.c
Regards,
Sara