How to read and storage data on an I2C eeprom using an stm32f100 series board.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-23 6:45 PM
Hello, I' m working in team on a project using stm32 f100 series board. I should use an eeprom to storage and read some data, the eeprom is the following: CAT24C512WI-GT3 and I also have the init code for this I2C eeprom:
void io_ee_scl(char s)
{
if(s)
GPIOB->BSRR=GPIO_PIN_6;
else
GPIOB->BRR=GPIO_PIN_6;
}
void io_ee_sda(char s)
{
if(s)
GPIOB->BSRR=GPIO_PIN_7;
else
GPIOB->BRR=GPIO_PIN_7;
}
void io_ee_wp(char s)
{
if(s)
GPIOB->BSRR=GPIO_PIN_5;
else
GPIOB->BRR=GPIO_PIN_5;
}
char read_eeprom() //read eeprom function
{
return ( (GPIOB->IDR&GPIO_PIN_7) ? 1 : 0 );
}
so I know the pins conected to my eeprom.
Considering I'm new in stm32 I need your help to understand how I can read and write datas on my eeprom....
Thank you
- Labels:
-
EEPROM devices
-
I2C
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-07-23 7:35 PM
So you're bit-bang it and not using the I2C peripheral?
Here's the manual for your device http://www.onsemi.com/pub/Collateral/CAT24C512-D.PDF
It describes the signals on the I2C pins, and how the address (eeprom) and data are sent.
Perhaps you can extend your code to implement the functionality described?
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-16 6:58 PM
Yes I am bit banging, can you suggest me where to find c code for do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-16 6:59 PM
Yes I am bit banging, can you suggest me where to find c code for do it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-16 11:33 PM
I have shared in this forum an example of I2C bit banging with EEPROM simple customizable source code.
Now, use the forum to find it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-17 8:48 AM
Do you mean this post: https://community.st.com/s/feed/0D50X0000AAI9JkSQL ?
