Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

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,
Fabien

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.

Regards.

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,
Fabien


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




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

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

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

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

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists