Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem


FreeRTOS+FAT for NOR SPI Flash

Posted by hssathya on June 20, 2018

Hi All,

Would you recmmond FreeRTOS+FAT for SPI based NOR FLASH? Is there a port already available for this?

Thanks, Sathya

FreeRTOS+FAT for NOR SPI Flash

Posted by heinbali01 on June 20, 2018

Hi Sathya, you have probably heard that FAT is not an optimal file system to be implemented in NOR flash. But yes, at leat one person has implemented a driver that works well with FreeRTOS+FAT. I will ask if that person is willing to share his code.

If you do not need compatibility with FAT, you could also look around and find a file system especially designed for NOR flash.

FreeRTOS+FAT for NOR SPI Flash

Posted by loszi on June 21, 2018

Hi Sathya, Please find an FreeRTOS+FAT driver for Spansion s25fl164k attached.

As Hein mentioned - using NOR Flash + FAT fs (without some form of wear leveling) is not the best idea, because the intensive usage could kill the FAT area of the device. I recommend using it only for write rarely / read many application like storing configuration.

If you still want to use the driver, you need to customize / implement the following low level functions in the portable directory:

static uint8t ucSpiTransferByte(uint8t ucTXData) static uint8t ucSpiQuadReadByte(void)

and don't forget to call: BaseTypet xSpansionSPISyncCache(FFDiskt pxDisk, cachestampt xOlderThan); before umount / power down for write back the changes.*

As you might see the code is quite experimental so no warranty at all, please use your own risk, and consider that each cache entry consumes 4KiB of RAM.

Regards, Szilárd


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ Sitemap ]    [ ]

Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.

Latest News

FreeRTOS v10.2.1 is available for immediate download. MIT licensed, includes 64-bit RISC-V, NXP Cortex-M33 demo & Nuvoton Cortex-M23 demo.

NXP tweet showing LPC5500 (ARMv8-M Cortex-M33) running FreeRTOS.

View a recording of the "OTA Update Security and Reliability" webinar, presented by TI and AWS.


FreeRTOS and other embedded software careers at AWS.

FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Cadence Tensilica Cortes

Espressif ESP32

IAR Partner

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers





STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

OpenRTOS and SafeRTOS

Xilinx Microblaze and Zynq partner