I've encountered an issue with the delay() function on the ATMEGA808 microcontroller. When I run the following code, the uC freezes, and no signal is detected on the TEST_PIN:
However, when I replace 'delay(10)'; with 'delayMicroseconds(10000);', the code runs smoothly. Additionally, when I run this code on an ATMEGA4809, it works without any issues.
I've encountered an issue with the delay() function on the ATMEGA808 microcontroller. When I run the following code, the uC freezes, and no signal is detected on the TEST_PIN:
`#include
define TEST_PIN 24
void setup() { pinMode(TEST_PIN, OUTPUT); // debug pin }
void loop() { digitalWrite(TEST_PIN, HIGH); delay(10); digitalWrite(TEST_PIN, LOW); delay(10); }`
However, when I replace 'delay(10)'; with 'delayMicroseconds(10000);', the code runs smoothly. Additionally, when I run this code on an ATMEGA4809, it works without any issues.
I noticed there's a similar issue reported here [https://github.com/MCUdude/MegaCoreX/issues/43], but I'm unsure if it applies to PlatformIO as well.
Could you please help me verify if this issue is specific to PlatformIO and provide guidance on how to address it?