You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: readme.md
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Over the past few years freeRTOS development has become increasingly 32-bit orie
22
22
FreeRTOS has a multitude of configuration options, which can be specified from within the FreeRTOSConfig.h file.
23
23
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.
24
24
25
-
The AVR Watchdog Timer is used to generate 15ms time slices, but Tasks that finish before their allocated time will hand execution back to the Scheduler. This does not affect the use of any of the normal Timer functions in Arduino.
25
+
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.
26
26
27
27
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.
28
28
@@ -36,17 +36,15 @@ Watchdog period options:
36
36
*`WDTO_1S`
37
37
*`WDTO_2S`
38
38
39
-
Note that Timer resolution 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. Also, trying to measure less than 15ms, with the default time slice, will not work.
39
+
Note that Timer resolution 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. Also, trying to delay for less than 15ms, with the default time slice, will not work.
40
40
41
-
The Arduino `delay()` function has been defined to automatically use the FreeRTOS `vTaskDelay()` function, so that Arduino example sketches and tutorials work with no change. If you would like to measure a short millisecond delay of less than one Tick (Watchdog period), then [use `millis()`](https://www.arduino.cc/reference/en/language/functions/time/millis/) to achieve this outcome (for example see [BlinkWithoutDelay](https://docs.arduino.cc/built-in-examples/digital/BlinkWithoutDelay)).
41
+
The Arduino `delay()` function has been defined to automatically use the FreeRTOS `vTaskDelay()` function, so that simple Arduino example sketches and tutorials work with no change. If you would like to measure a short millisecond delay of less than one Tick (Watchdog period), then use [`millis()`](https://www.arduino.cc/reference/en/language/functions/time/millis/) (or with greater granularity use [`micros()`](https://www.arduino.cc/reference/en/language/functions/time/micros/)) to achieve this outcome (for example see [BlinkWithoutDelay](https://docs.arduino.cc/built-in-examples/digital/BlinkWithoutDelay)).
42
42
43
-
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. This using Timer0 will break Arduino `millis()` and `delay()` though, as these rely on Timer0.
43
+
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 `millis()` and `micros()` though, as these functions rely on Timer0.
44
44
45
-
Stack for the `loop()` function has been set at 192 Bytes. This can be configured by adjusting the `configMINIMAL_STACK_SIZE` parameter. If you have stack overflow issues, just increase it. Users should prefer to allocate larger structures, arrays, or buffers using `pvPortMalloc()`, rather than defining them locally on the stack. If you are not using`loop()` then the stack size can be reduced to 85 Bytes, saving some valuable memory.
45
+
Stack for the `loop()` function has been set at 192 Bytes. This can be configured by adjusting the `configMINIMAL_STACK_SIZE` parameter. If you have stack overflow issues, just increase it. Users should prefer to allocate larger structures, arrays, or buffers using `pvPortMalloc()`, rather than defining them locally on the stack. Ideally you should not use`loop()`for your sketches, and then the stack size can be reduced down to 85 Bytes, saving some valuable memory.
46
46
47
-
Memory for the heap is allocated by the normal `malloc()` function, wrapped by `pvPortMalloc()`.
48
-
This option has been selected because it is automatically adjusted to use the capabilities of each device.
49
-
Other heap allocation schemes are supported by FreeRTOS, and they can used with additional configuration.
47
+
Memory for the heap is allocated by the normal `malloc()` function, wrapped by `pvPortMalloc()`. This option has been selected because it is automatically adjusted to use the capabilities of each device. Other heap allocation schemes are supported by FreeRTOS, and they can used with some additional configuration.
0 commit comments