MFS on top of MMC/SD drivers

Discussions and support about ChibiOS/HAL, the MCU Hardware Abstraction Layer.
Post Reply
heliochronix
Posts: 34
Joined: Thu Aug 31, 2017 6:32 pm
Has thanked: 8 times
Been thanked: 6 times

MFS on top of MMC/SD drivers

Post by heliochronix »

Hello everyone,

I'm currently working on a project that would benefit greatly from the MFS complex driver. I'm trying to figure out if it's possible to use this with one of the SD/MMC drivers I have available for my platform to implement the MFS BaseFlash object. My platform is an STM32F446RE, so I believe my options for SD/MMC drivers are MMC-SPI and SDIO.

Is it possible to use either of these drivers with the MFS complex driver?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: MFS on top of MMC/SD drivers

Post by Giovanni »

Hi,

It would be possible but you would need to simulate a flat NOR flash on top of a block-based SD-MMC device and implement the flash interface. Wouldn't be easier to attach a SPI NOR flash?

In addition, you would need to enforce a 512 bytes alignment for MFS or write operations could be destructive in case of power loss.

Giovanni
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: MFS on top of MMC/SD drivers

Post by steved »

Have a look at https://github.com/ARMmbed/littlefs - it might be a more straightforward alternative to implement if it does what you want.
heliochronix
Posts: 34
Joined: Thu Aug 31, 2017 6:32 pm
Has thanked: 8 times
Been thanked: 6 times

Re: MFS on top of MMC/SD drivers

Post by heliochronix »

Hello,

That's a good point. Mostly we wanted to try it on MMC/SD for ease of swapping out and checking during the development/testing phase of our project. I'll take a look at littlefs to see if it'll work for us. The goal is to have redundant checksum'd firmware images and configuration information for subsystems on a satellite project.
Post Reply