Arduino ESP32 timer API

Hi,

I am trying to use the timer API for my esp32-s3-devkitc-1 board. But the compiler seems not to know about the new 3.x version.

AI added two lines to my working project that produce errors indicating the old 2,x timer API is used.
I have this in the globals section of my code:hw_timer_t *DeltaTimer = NULL;

And this in the setup() section: DeltaTimer = timerBegin(1000000);

My compile log shows

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-s3-devkitc-1.html
PLATFORM: Espressif 32 (6.9.0) > Espressif ESP32-S3-DevKitC-1-N8 (8 MB QD, No PSRAM)
HARDWARE: ESP32S3 240MHz, 320KB RAM, 8MB Flash
DEBUG: Current (esp-builtin) On-board (esp-builtin) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20017.241212+sha.dcc1105b

When I compile I keep getting the error that I need 3 arguments.

I see in some past postings that some stuff was not updated yet for my board. There were workarounds where a 3rd party library is used. And there were several issues using this.

So I am hoping that there is a platform update available that just has not made it’s way thru all of the toolsets.

Is there s simple solution for me? Can I specify an @revision to my platform to get the latest API?

Thanks,
Tony

You need to use a different platform URL in your platformio.ini to get Arduino-ESP32 3.x support. E.g., as discussed in this topic and this topic:

platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip

to get Arduino-ESP32 3.1.3.

This is because PlatformIO and Espressif are in a now year-long disagreemen about the support of the Espressif chips in the official platform (https://github.com/platformio/platform-espressif32/).

Thanks Maximilian,

That link worked. However it turned out that one of the libraries that I use really did not like the upgrade and has not been updated. So I reverted to my old platform. My incentive for upgrading was to see if a problem I was having would be fixed by the new platform. Eventually I found the problem in my code that fixed my issue. Hope Espressif and PlatformIO get their stuff together!

Tony

1 Like