-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
megaavr
support
#88
Comments
Hi Flössie, I'd suggest to have a look at the FreeRTOS port specifically for Mega0. This came in #101. It would give some guidance on how the newer Timer capabilities are being configured. It does raise the philosophical discussion on the rationale for this library. My original thought was (and still is) to keep it really simple for people just starting out with FreeRTOS. So, keeping close to the avr-libc capabilities, and generalised hardware made sense. I pushed back on older ATmega devices previously, because they don't have WDT interrupt capabilities, even though they are supported by avr-libc. And here we have a case where the Mega0 devices don't have avr-libc support, nor do they have a standard WDT interrupt, which would mean creating a special case just for this variant. I guess the pragmatic answer is knowing whether or not the Arduino IDE supports the required Timer control libraries without requiring additional cores, or other specialities? And if there is standardised support, perhaps it is worth bringing that in here? Thoughts? |
Hi Phillip,
Ha, good point. There is even one for the AVR-Dx series.
PIT is the new WDT: 😉
My brute port has too many
What do you mean by "Timer control libraries"? Something like an RTC lib for the 4809 based Arduinos in the core? |
Just an equivalence for these avr-libc headers and macros, which abstracts for the AVR-Dx series, so that the user doesn't have to wrangle separately them to the Arduino IDE. #include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/sleep.h>
#include <avr/wdt.h> |
see also |
Updated email sent to a user.
https://github.com/FreeRTOS/FreeRTOS-Kernel-Partner-Supported-Ports/tree/main/GCC
|
While an issue with the ArduinoCore-megaavr code is being resolved, it is possible to use the method described by Tom in his instructions to get FreeRTOS working with ATmega4809 devices. This method will require you to modify the ArduinoCore-megaavr code to be successful. |
It seems that Arduino has given up on 8 bit machines. The announcement of the Uno R4, including a WIFI option, seems like the final straw. |
Still, the AVR-Dx are often enough. 🙂 |
Hi Phillip,
I recently got hold of some AVR128DB28. Though they are pretty new, Spence Konde already supports them with DxCore. They belong to the
megaavr
family of controllers that feature a PIT instead of a WDT.I'm trying to port the Arduino_FreeRTOS_Library to the PIT and have started a branch here. It's completely WIP, but already compiles and runs for a few ticks.
The first nicety I came across was that
megaavr
s have a "Timer/Counter type B" which is defined asTCB_t
in the toolchain headers. 😒 I've thus renamed FreeRTOS'TCB_t
, but there must be a better workaround.Now the problem is the premature halt after some ticks. Seems like the serial freaks out although there's no output from the blink task, then the PIT interrupt stops. Can you give me some hints concerning debugging or architectural differences between
avr
andmegaavr
?Best,
Flössie
The text was updated successfully, but these errors were encountered: