freeRTOS with SAMC21 MCUs

Hi, I want to know if SAMC21 processor has the supported port for freeRTOs. Though I don’t see the mention of SAMC processor in the freeRTOs official page, I see a page talking about freeRTOs with SAMC21 MCU, but using harmony v3 driver plugin


Find the link to that page: I’m not allowed to put link here; so attaching an image)

I really want to know if SAMC21 has the native porting for freeRTOs. If so can we use ATMEL stduio IDE to port the same?

The same FreeRTOS Cortex-M0 port runs on all Cortex-M0 microcontrollers (likewise, the same Cortex-M3 port runs on all Cortex-M3 and all Cortex-M4 microcontrollers that don’t have an FPU, and the same Cortex-M4F port runs on all Cortex-M4F and Cortex-M7 microcontrollers). So yes, it is supported.

We use FreeRTOS on SAMC21 MCUs already. A few points to note:

  • If you are using the DIVAS (hardware divide and square root) peripheral then you don’t want to have task switches in the middle if a divide or integer square root operation. The standard Microchip drivers use the DIVAS for divide operations, but they disable interrupts while the division is in progress. So this is OK as long as you don’t mind the extra interrupt latency.
  • Similarly, if you use the CRC unit to calculate the CRC of data already stored in memory, then you need to either lock the task scheduler while you use the CRC unit, or add the CRC unit state to the task save/restore code.