atmega_common: thread_arch.c

Dear RIOT users,

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?

Best Regards, Robert

Hi Robert,

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.

Best,

Hi again,

the interrupt ist trigged and occurs two times until the reset happens.

Best Regards, Robert

Hi Robert,

have you checked the state of your watchdog? A reproducable reset after a certain amount of time points in that direction...

Cheers, Hauke

Hi Hauke,

the watchdog is disabled (checked it right in the IRQ).

- Robert