3.3 Configuring FreeRTOS

Perform the following FreeRTOS configuration.

  1. Open MPLAB Harmony Configurator (MHC) and expand the Third Party Libraries and RTOS tree.
  2. Enable “Use RTOS?” and select the first FreeRTOS option (latest version).
  3. 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:
    1. 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.
    2. TCPIP stack and heap size are dependent on the user’s application design.

    The FreeRTOS configuration displays in the following image.

Figure 3-7. Harmony Configurator