Forum: µC & Digital Electronics STM32F0 and 1Mbit EEprom

von Jens Wörmann (Guest)

Rate this post
not useful
Dear Madams and Sirs,

im trying to programming / and reading an 1Mbit EEprom with STM32F030x.

There are some issues i am working on and make me some headache.

Im using the STM32f0xx_i2c files for working and a Keil Compiler 

My first problem is:
Im using one of our internal libarys to write and read to the eeprom. It 
is programmed as discriebed in the the STM Reference Manual and worked 
fine with EEprom values lower 1Mbit.

I added a second adress byte to the adressing and put the value of 
sending bits in the I2C_TransferHandling to 2.

But when im looking to the data with a Osciloscop I see only one adress 
byte. In case of writing it seems that the 2nd one is puting to data 
(because i have to rise the data by one to the former version). In case 
of reading the start byte / device select byte for reading  will be send 
after the 1st Adressbyte. The 2nd adress byte is missing.

The other issue is: When im putting the 2nd Adress byte to the code the 
routine will not more handle the waiting for the TXIS flag after setting 
I2C_TransferHandling at the start. It looks like hanging up there. This 
work also fine, when i'm only using one byte of adressing.

I try to programm the routine new, in a different way - by using 
I2C_SlaveAddressConfig(); I2C_NumberOfBytesConfig(); I2C_SendData() and 
try it a the write routine. This didn't work either with the same 
result. the starting routing stopps after the first adress byte.

Does somebody has an example for this task or an idea what is going 

Kind regards



Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.