
Arduino doesn’t configure the watchdog timer, and conveniently the watchdog configuration is identical across the entire ATmega range. However, all AVR ATmega devices have a watchdog timer which is driven by an independent 128kHz internal oscillator. In the case of the Arduino environment all of the normal timers are configured in advance, and therefore are not available for use as the system_tick timer. These optimizations are not necessarily the best use of FreeRTOS, but they make the integration much easier.įreeRTOS needs to have an interrupt timer to trigger the scheduler to check which task should be using the CPU, and to fairly distribute processing time among equivalent priority tasks. Some key aspects of the AVR FreeRTOS port have been adjusted to create the seamless integration with the Arduino IDE. That means that all of the AVR command line tools used to build Arduino sketches will also just work my AVR port of FreeRTOS. One of the good things about the Arduino core environment is that it is just the normal AVR environment with a simple Java IDE added.

So recently, with an important hack-a-thon coming up, I thought it would be nice to build a robust FreeRTOS implementation that can just shim into the Arduino IDE and allow me to use the best parts of both environments, seamlessly. Also, when time is of the essence rewriting someone’s existing driver is just asking for stress and failure. But, sometimes it would be nice to just try out a new piece of hardware in a solid multi-tasking environment without having to dive into the datasheets and write code.
ARDUINO TIMER INTERRUPT STACK OVERFLOW DRIVERS
I’ve written (acquired, stolen, and corrupted) a plethora of different drivers and solutions for the various projects I’ve built over the last years.


For a long time I have been using the AVR port of FreeRTOS as the platform for my Arduino hardware habit.
