在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):feilipu/Arduino_FreeRTOS_Library开源软件地址(OpenSource Url):https://github.com/feilipu/Arduino_FreeRTOS_Library开源编程语言(OpenSource Language):C 99.2%开源软件介绍(OpenSource Introduction):This is a fork of Richard Barry's freeRTOS, optimised for the Arduino AVR devices. It has been created to provide access to FreeRTOS capabilities, with full compatibility to the Arduino environment. It does this by keeping hands off almost everything, and only touching the minimum of hardware to be successful. Usage & Further ReadingRead the short blog post on Arduino FreeRTOS to get started. And there is another much older post on using FreeRTOS with AVR, which may be useful to read too. There are some further posts I've written on Hackster.IO, but they're essentially the same content. The canonical source for information is the FreeRTOS Web Site. Within this site, the Getting Started page is very useful. This is the source for FreeRTOS usage (as distinct from installing and using this Arduino Library). My other AVRfreeRTOS Sourceforge Repository or AVRfreeRTOS Github has plenty of examples, ranging from blink through to a synthesiser. This library was the genesis of generalised support for the ATmega platform within FreeRTOS. Over the past few years freeRTOS development has become increasingly 32-bit orientated, with little change or improvement for the 8-bit world. As such I'm treating this 1st January 2022 10.4.6 snapshot as my LTS release. Bugfixes to 7th August 2022 have been added. GeneralFreeRTOS has a multitude of configuration options, which can be specified from within the FreeRTOSConfig.h file. To keep commonality with all of the Arduino hardware options, some sensible defaults have been selected. Feel free to change these defaults as you gain experience with FreeRTOS. The AVR Watchdog Timer is used to generate 15ms time slices (Ticks), but Tasks that finish before their allocated time will hand execution back to the Scheduler. Time slices can be selected from 15ms up to 500ms. Slower time slicing can allow the Arduino MCU to sleep for longer, without the complexity of a Tickless idle. Watchdog period options:
Note that Timer resolution (or granularity) is affected by integer math division and the time slice selected. Trying to measure 50ms, using a 120ms time slice for example, won't work. The Arduino The 8-bit AVR Timer0 has been added as an option for the experienced user. Please examine the source code to figure out how to use it. Reconfiguring Timer0 for FreeRTOS will break Arduino Stack for the Memory for the heap is allocated by the normal UpgradingErrors
ErrataTesting with the Software Serial library shows some incompatibilities at low baud rates (9600), due to the extended time this library disables the global interrupt. Use the hardware USARTs. Compatibility
The new megaAVR 0-Series devices (eg. ATmega4809) are not fully compatible with this library. Their Timer configuration is substantially different from previous devices, and forms part of a new avr8x architecture. It may be a while until avr-libc is updated to include support for megaAVR devices, but when that happens further work will be added here. Files & Configuration
PlatformIOArduino FreeRTOS is available in the PlatformIO library manager for use in a PlatformIO project. Watchdog period is configurable using build-flags: build_flags =
-DportUSE_WDTO=WDTO_15MS Code of conductSee the Code of conduct.
Contributors
|
Phillip Stevens |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论