TimerInterrupt with ArduinoIDE and XIAO_ESP32S3

I’m trying to get timer interrupts working in ArduinoIDE with one of the TimerInterrupt libraries like ESP32TimerInteerrupt. At the end TIMER_BASE_CLK is missing.
The reason seems to be esp-idf changes from v4.4 to v5.0, see here and here.

Can somebody get one of the TimerInterrupt library examples working? (examples available from the library manager after installing the library)

did you try just rolling back to the older v4.4… sometimes that is the best fix and maybe they will fix it later… and by they i mean the author of the lib

Good idea to take an older library version. Unfortunately this does not work. The library needs to be changed. The maintainer archived the GitHub repository, so I don’t except that to happen.

It could help to rollback to an older XIAO_ESP32S3 board implementation. I did not found a way to do that. Is it possible?

I really love helpful comments like this one

they are so useful to solving the problems… what da?

https://docs.espressif.com/projects/esp-idf/en/v4.4/esp32s3/api-reference/peripherals/timer.html

I read the links I posted. You don’t need need to repeat their content.

I don’t know how to rollback to an older ArduinoIDE XIAO_ESP32S3 board version which uses a pre v5.0 esp-idf framework.
The alternative would be an adapted TimerInterrupt libraray for ESP32 for Arduino. I tried to fix the TIMER_BASE_CLK problem but was unsuccessful.

no need to be sassy bro…

I think the document linked above shows pretty clearly how the timer code is written… just need to restructure the code to remove the call TIMER_BASE_CLK and replace it with the desired reference clock… what the code is asking you is what clock do you want to used for the timer… you have to tell it…

In the screenshot you show how to chose an older library version.
The current version of the board XIAO_ESP32S3 uses esp-idf v5.1.
This is why it is incompatible to the outdated TimerInterrupt libraries.
A possible solution would maybe to get a XIAO_ESP32S3 board version which uses esp-idf prior v5.0.
I don’t know how to install an older XIAO_ESP32S3 board version.

So, if it’s so easy for you, can you fix the library?

I wish i could, and i would if it was easy for me, but i dont understand enough… i dont use esp-idf at all have you tried an older processor and see if it works on that i do know that every processor is different, so its like starting all over again… maybe a XIAO ESP32C3, or XIAO ESP32C6

what are you trying to do with the timer interupt?

Hi there,
If you use to older BSP 2.0.11 or 2.0.14 it will be most compatible. Not the library that, won’t help you at all.
Post your compiler output, the first 4 lines Please.
ANYONE who is using the latest BSP 3.0.1 or alpha or beta, NONE of those will work.
Go read the NOTES is spells it out a lot of older things won’t work with the New 5.0 compatible BSP.
Roll back to the BSP that was available with the LIB.
HTH
GL :slight_smile: PJ
:v:

Here’s the official guide.Migration from 2.x to 3.0 - - — Arduino ESP32 latest documentation

2 Likes