I am trying to port our platform to RIOT. It is based on an atmega1284p
and I wanted to use the atmega_common platform. However, the
thread_arch.c is missing functions and my device is randomly restarting
(with no reset reason), after about half a second after the first
context switch happened (via an interrupt).
Is anyone using any platforms that rely on the atmega_common or has an
idea what might be happening?
The current support of context switching relies in the use of “intentionally triggered” external interrupts, due to the lack of software interrupts on AVR8 MCUs.
Please take a look on the implementation of this feature for other boards, such as the arduino-mega2560 or waspmote-pro (board.h file). You’ll need a free EXTI pin on your custom board.
I don’t know if this is the cause of your resets, but it seems to me that this could be.