Hi everyone, I’m having an unusual issue on an ATTiny85 I am programming with the Arduino IDE.
I am trying to receive a serial stream from an APM flight controller using the Mavlink protocol and I’ve got everything I need to working including debug via an FTDI but I have noticed that the Attiny seems to be periodically rebooting sometimes a few times a second.
I have confirmed the reboot with a loop counter on the main loop that gets transmitted each time and despite it being a byte size variable it resets on reaching only about 10-20 (so not an overflow). Adding a startup debug string to the setup routine also shows a reboot every second or so.
I’m a bit stumped as to why this is happening - I can’t see any major faults in the code but I am hoping someone here can shed some light on the situation. I am very confident it is a software issue as if I run a program that does nothing but increment a uint32_t and debug it runs continuously as long as I have watched it which tells me the hardware is staying online fine.
Have attached the code in question - thanks in advance to anyone who can help out.
Mavlink_Attiny85_Native.ino (3.08 KB)