3.3 Configuring FreeRTOS
Perform the following FreeRTOS configuration.
- Open MPLAB Harmony Configurator (MHC) and expand the Third Party Libraries and RTOS tree.
- Enable “Use RTOS?” and select the first FreeRTOS option (latest version).
- Expand RTOS Configuration and change
the following settings:
- Set Tick rate to 1000
- Set Minimal Stack Size to 512 bytes
- Set ISR Stack Size to 512 bytes
- Set Memory Management Type to Heap 2
- Set Total Heap Size to 40960 bytes
The increased stack and heap sizes are to accommodate TCP/IP tasks and Wi-Fi driver tasks.
Note:- The timer and clock speed options are locked to specified values. This indicates Timer 1 is used by the FreeRTOS to manage ticks. Each module (drivers and system services) in MHC contains its own RTOS configuration setting.
- TCPIP stack and heap size are dependent on the user’s application design.
The FreeRTOS configuration displays in the following image.