ESP32-C3 PWM Lockstep

Ichoravor
Posts: 2
Joined: Wed May 18, 2022 7:19 pm

ESP32-C3 PWM Lockstep

Postby Ichoravor » Wed May 18, 2022 7:29 pm

Hello,

I've been trying to get the ESP32-C3's PWM output to synchronize across different timer channels and have been met with difficult in achieving that. I'm trying to have the device output four PWM signals at 20MHz, 2MHz, 1MHz and 32.25kHz, I've achieved this, however the problem is that the signals are offset from each other with an offset that changes on restart, that is, their phases aren't aligned. Does anyone know a way of achieving this? I've directly changed the ledc_dev_t struct without any success, i.e.
hw->timer_group[speed_mode].timer[time_num].conf.pause = 1;
hw->channel_group[speed_mode].channel[channel_num].conf0.sig_out_en = 1;
and so forth.

Is there a register that would allow me to ensure they're starting up in phase with each other or something?

Thanks for your time and help

Who is online

Users browsing this forum: No registered users and 128 guests