Description
Board
Arduino Nano ESP32
Device Description
Arduino Nano ESP32
Hardware Configuration
Nothing attached
Version
v3.0.4
IDE Name
Arduino IDE 1.0 and 2.0
Operating System
Windows 11
Flash frequency
NA
PSRAM enabled
no
Upload speed
NB Arduino settings in board
Description
I noticed while transferring a large Arduino sketch on an Arduino Nano ESP32 from ESP32 core version 2.0.17 to ESP32 core V3..0.5 the software loop speeds dropped from 220,000 to 169,000 loops per second.
The speed reduction is also with versions 3.0.1 - 3.0.4
With the sketch below the speed reduction is even more and almost 50%.
I did not test the ESP32 Zero and C3-12F board with the ESP32 V2 core but I expect the same results in speed differences
Below the 'Loops per second' when adding one to the loop counter for one second.
No difference noticed using uint64_t or uint32_t
*** Arduino Nano ESP32 board on Arduino ESP32 core V2.0.17
Loops per second: 737744
Loops per second: 734583
Loops per second: 734451
Loops per second: 734451
Loops per second: 734451
Loops per second: 734451
*** Processors on V3.0.5
Arduino Nano ESP32
Loops per second: 380670
Loops per second: 380709
Loops per second: 380726
Loops per second: 380724
Loops per second: 380727
ESP32 S3 Zero
Loops per second: 382485
Loops per second: 382488
Loops per second: 382487
Loops per second: 382487
Loops per second: 382487
ESP32-C3-12F
Loops per second: 125696
Loops per second: 126240
Loops per second: 125695
Loops per second: 126241
Loops per second: 125695
Loops per second: 126240
Loops per second: 125696
Sketch
uint32_t Loopcounter = 0;
static uint32_t msTick;
void setup()
{
Serial.begin(115200); // Setup the serial port to 115200 baud //
msTick = millis();
}
void loop()
{
Loopcounter++;
EverySecondCheck();
}
//--------------------------------------------//
// COMMON Update routine done every second
//--------------------------------------------
void EverySecondCheck(void)
{
uint32_t msLeap = millis() - msTick; //
if (msLeap >999) // Every second enter the loop
{
msTick = millis();
Serial.printf("Loops per second: %u\n",Loopcounter);
Loopcounter = 0;
}
}
Debug Message
NA
Other Steps to Reproduce
NA
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status