Replies: 5 comments
-
Edit Still testing but seem to work Eric |
Beta Was this translation helpful? Give feedback.
-
@SigP226 Eric, I think, that's a good idea. Using Timer3 if available could make the library even more useful. Do you have any code to share? You can easily fork this library and create a branch with enhancements. Best, |
Beta Was this translation helpful? Give feedback.
-
I have a But of course using the other timers breaks the generality of the library because each ATmega MCU has different timer capabilities, and the Arduino core configures all the normal timers (whether it uses them or not), so the standard core will be broken. If you want to dig deeper, then you’re better off ditching Arduino and just using the parts you need for your particular solution. |
Beta Was this translation helpful? Give feedback.
-
using port.c from AVRFreeRTOS repo and modifications as proposed by SigP226, I've been able to successfully run FreeRTOS on Timer3, but I don't have accurate timing at all. Anyone already had this issue? |
Beta Was this translation helpful? Give feedback.
-
@anatom74 what you're probably finding is the issue with Arduino, that it possesses and configures ALL the hardware available on the ATmega device. So, despite the fact that you think you're configuring the timer to work correctly, because you're using the correct initialisation routine from my code, Arduino is coming in later and reconfiguring ALL the timers (here specifically Timer 3) to suit what it needs. Mine,... its all mine. There really isn't a clean way to work with Arduino and be deterministic about timing and memory, and keep hardware (any ATmega MCU) generality. But, if you don't use Arduino then you can't rely on its benefits, either. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
my configuration:
Eclipse Oxygen 2 (on windows 7)
Avr plugin
arduino source code
Arduino_FreeRTOS_Library (10.x)
a simple "blink" program
board : meduino2560
Everything compile and work fine but I would like to use an other timer than watchdog timer to reduce tick to 1ms. I tried to understand how to extract interesting code from AvrFreeRTOS (freeRTOS10xx repository) which have this timer configuration, but I resign, don't have enough skill.
Is there any "simple" way to add the timer 1/2/3 configuration for tick in the Arduino_FreeRTOS_Library?
which file do I need to modify?
Eric
Beta Was this translation helpful? Give feedback.
All reactions