From ChibiOS to FreeRTOS

While Marc and Xavier are stuck in a tedious FH class, Vlaya and I have decided to work on the SD card. Our goal is to upload animations to the SD card (the same animations on each Phyllo). The Phyllos agree thanks to a discussion over Wifi on an animation identifiant and to start the animation at a chosen time (as you may remember, the Phyllos have a common time reference). Then each Phyllo will search the SD card for the desired animation and send it to the LEDs.

We started to read ChibiOS and STM32H7 documentation about SD card and SDC Driver, but soon, we discovered that on the last ChibiOS stable version (19.1.3) didn’t support SDC driver for STM32H7, ie it isn’t part of the included drivers for this processor.

As ChibiOS claims otherwise, we continued our research and Vlaya finally found this git repository, containing a new version of the SDC Driver (SDMMCv2), compatible with STM32H7.

At that point, we had two options : switch to FreeRTOS or use the ChibiOS version on gitHub. Furthermore, ChibiOS support for STM32H7 is a known issue, and we already had an issue with ChibiOS using the SPI Driver : it uses a DMA, and data cache present on the Cortex M7 processors and used by the DMA has a write back mechanism that generates some problems, as explained here. Several solutions are proposed in the article, and we hoped that the DMA Driver of FreeRTOS settled by itself this cache issue. 

A quick look at FreeRTOS code undeceives us on this point, but we have decided to switch to FreeRTOS nevertheless.

Leave a Reply

Your email address will not be published. Required fields are marked *