Quality RTOS & Embedded Software

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


Using external EEPROM for application data

Posted by Fabien on June 25, 2011
Hi all,

I start my first project using FreeRTOS and I want to check with you if I did correct things:

My application need to store data inside an external EEPROM I2C memory. Multiple tasks need to be able to read and write to this memory.

- For Write operation, I plan to create a Gatekeeper task with one queue. All tasks will write to this queue and the Gatekeeper will write data to EEPROM.

-For the Read operation, I plan to use the same gatekeeper, but to have one dedicated Queue for each task that need to read data from this memory.

Do you think this is the cleanest way to access this EEPROM memory using FreeRTOS? If not, could you please explain me how to do this?

Thanks in advance for your help.
Best regards,

RE: Using external EEPROM for application data

Posted by Richard on June 25, 2011
This is really an application design question, but I will comment one the less.

Your writing concept sounds fine. However, for reading, it would be simplest to use the same queue. A write command to the gatekeeper can give the address to write to in the eeprom, and the data to be written (however many bytes, and from where). A read commend can give the address to read from in the eeprom, and where to place the data that is read out of the eeprom (where to store however many bytes are being read). Then you need some sort of flag to say when the read is complete.

Alternatively, you could just have a read eeprom function and a write eeprom function, and use the same mutex within each function to ensure multiple access do not happen simultaneously. If that is a practical solution or not depends on your application though.


RE: Using external EEPROM for application data

Posted by Fabien on June 27, 2011
Hi Richard,

First of all, I would like to thank you for your quick answer.

I am really happy to hear that my concept sounds fine. I just read your reply and using only one Queue for Read/Write seems very good and better.
About the flag, I think I will use a BinarySemaphore dedicate for each tasks in order to release each task from Blocked state when data is ready.

Best regards,

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

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

Latest News

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

Version 10.1.1 of the FreeRTOS kernel is available for immediate download. MIT licensed.

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

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