I2C and EEprom
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-17 3:34 AM
Posted on March 17, 2014 at 11:34
Hi,
I'm starting to develop an application where I'll manage EEprom data by I2C. Is there a complete example for stm32F0discovery? Thanks
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-17 5:22 AM
Posted on March 17, 2014 at 13:22
It's for the EVAL board, but could be ported.
STM32F0xx_StdPeriph_Lib_V1.1.0\Project\STM32F0xx_StdPeriph_Examples\I2C\I2C_EEPROM
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2014-03-21 4:09 AM
Posted on March 21, 2014 at 12:09
Thanks Clive1,
I did as you said and it all works, but I have a problem. When I need to do continuousreads o writes, my project doesn't work. My code:if(nciclo == 0){
eeWriteBuffer(Tx1Buffer, 0, BUFFER_SIZE2);
eeWaitEepromStandbyState();
eeWriteBuffer(Tx2Buffer, 32, BUFFER_SIZE2);
eeWaitEepromStandbyState();
nciclo = 1;
}else{
eeRead(Rx1Buffer, 0, (uint16_t *)(&NumDataRead));
eeRead(Rx2Buffer, 32, (uint16_t *)(&NumDataRead));
nciclo = 0;
}
This code is into a task which is called every 100msec. The first time writes page0 and page1,
the second time reads page0 and page1. When I read Rx1Buffer is ok, instead Rx2Buffer is empty. Why? Is there an instruction to wait the next write/read?
