So I’ve been ripping out my hair for the past week or so trying to debug an issue I’ve been having with a little tiny85 blinkenlichten I’ve been working on where a switch that falls through to a sleep after timing out worked for 8 modes out of 9, but the 9th mode just never slept consistently, the sketch seemed like it was restarting from loop() whenever I break’ed out of the function the switch case called. But only that particular function, and only part of the time and and and. Maddening, especially when it seemed to exhibit itself more when I let it run longer.
I finally just decided to go all in and switch over to the arduino-tiny core instead of the HLT core and after tweaking speeds (it’s all nests of delay loops, so compiler optimizations affect it), initial results are promising. It sleeps when it should be! Power draw is what I expect - actually less in the main loop, by a third, and it still enters the low power sleep like I want it to. The arduino-tiny core includes the 16MHz PLL clock on the tiny85 without having to muck around in boards.txt, too!
It was far less annoying to switch than I had been afraid it would be after all the personalizations I’d made to the HLT core that I wasn’t sure I’d remember. My code just up and compiled, although not with the appbundle I have for the Arduino Tiny with the PCREL-proof upgraded avr-gcc toolchain. Eh, Tom Carpenter’s replacement ld should solve the 4k barrier when I start hitting it again.
(…of course, I’m sure I’ve jinxed it by suggesting that it seems to be working now…)