Closed
Description
Hardware:
Board: ?Adafruit ESP32 Feather Clone?
Core Installation/update date: ?15/march/2018?
IDE name: ?Arduino IDE?
Flash Frequency: ?80Mhz?
Upload Speed: ?921600?
Description:
If I change the CPU freq then the output of millis() becomes invalid, it changes inversely proportionally with the freq. Perhaps it is a known error but I haven't see any documentation about it.
#include "soc/rtc.h"
void setup() {
rtc_clk_cpu_freq_set(RTC_CPU_FREQ_80M);
int startTime, interval;
}
void loop() {
startTime = millis();
delay(1000);
interval = millis() - startTime; // it will be 1000, but that is 3000 in real
}
Metadata
Metadata
Assignees
Labels
No labels