When I flash the device with my code and my application auto-executes, the startup() macro works exactly as expected. My external LED turns on almost right away. Great success! BUT!
After the device sleeps upon completing that first execution, waking the device does not execute the startup() code. The rest of the application runs fine, but the function I’m calling via Startup() does not run.
A possible clue - upon completing the flash, the tiny onboard LED at D7 on the Electron turns on and my LED comes on right after that. Every other time I run the application upon waking after a button press, the tiny onboard LED at D7 does not turn on and my LED does not come on. I’m assuming there’s a connection between the two but I don’t know what it is.
Are there any known limitations of using Startup() when waking via a button press? Am I missing something obvious here?