Arduino-FOC icon indicating copy to clipboard operation
Arduino-FOC copied to clipboard

[BUG] MCPWM error on ESP32-S3

Open sanjay-swain opened this issue 7 months ago • 3 comments

Hello, I just bought a simplefocmini on for the first time and uploaded the open loop motor control example but was getting the following error:

ESP32-DRV: ERROR - Could not initialize the timer in group: 0
E (5) mcpwm: mcpwm_new_timer(106): register back up is not supported
Driver Init Failed

I am using Arduino IDE. Any idea what is causing this?

EDIT: By searching through the docs this "register back up not supported" is related to SOC_MCPWM_SUPPORT_SLEEP_RETENTION flag which is a part of ESP32-C6 power management section. So.. I am now confused. Why this is even called again? I will try again with another computer tomorrow. Let's see

EDIT 2: Okay so it turns out esp-idf 5.4 added a power management mode which needs a flag allow_pd to be defined on mcpwm_timer_config_t. I just downgraded to esp32-arduino version 3.1.3 built with esp-idf 5.3 and it works as intended.

So I guess the library needs to be updated to use the new methods. But this works for now.

Here is the reference: docs

sanjay-swain avatar Apr 03 '25 15:04 sanjay-swain