cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 I2C Write/Read to the Flash Memory

gshet1
Associate II

Hi folks,

I would like to use the I2C serial communication protocol to write/read from the Flash Memory using the STM32G474 microcontroller. I am using the B-G474E-DPOW1 board which does not have an EEPROM. Is it possible to achieve this goal or do I have to use the I2C serial communication protocol to write/read to an external EEPROM. 

I would appreciate any pointers on this matter. Thanks.

 

Best Regards,

Gautam

1 ACCEPTED SOLUTION

Accepted Solutions

May be it's a language thing, but you seem to have restated what you said before.

Do you want the STM32G474 to act as an I2C SLAVE EEPROM to some other MCU or Board? What device is it pretending to be?

The STM32G474 supports I2C, and if you wire up an external I2C EEPROM you could write to that from the STM32 side.

There should be examples of writing the internal FLASH, and perhaps the EEPROM Emulation ports too. Writing to the internal FLASH doesn't involve I2C, code running on the STM32 can access it directly.

The System Loader might support I2C methods to write the internal FLASH, check Application Note AN2606, and related protocol documentation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

4 REPLIES 4

>>Is it possible to achieve this goal..

What exactly IS the goal here?

The board almost certainly supports I2C, and connectivity to an I2C EEPROM. Which one did you have in mind? What capacity are you looking for? How often are you updating / changing the content?

One can use internal flash as a means of storing data in a semi-permanent manner. Might be suitable depending on what the GOALs and REQUIREMENTs actually amount too.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Thanks for your feedback on this matter. My plan is to be able to write/read some data to the EEPROM using the STM32G474 microcontroller via the I2C protocol. But since the B-G474E-DPOW1 board has no EEPROM on it and I have no access to an external EEPROM, I am trying to see if I can use I2C to directly write/read to the Flash memory.

 

Best Regards,

Gautam

May be it's a language thing, but you seem to have restated what you said before.

Do you want the STM32G474 to act as an I2C SLAVE EEPROM to some other MCU or Board? What device is it pretending to be?

The STM32G474 supports I2C, and if you wire up an external I2C EEPROM you could write to that from the STM32 side.

There should be examples of writing the internal FLASH, and perhaps the EEPROM Emulation ports too. Writing to the internal FLASH doesn't involve I2C, code running on the STM32 can access it directly.

The System Loader might support I2C methods to write the internal FLASH, check Application Note AN2606, and related protocol documentation.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
gshet1
Associate II

I appreciate your valuable pointers on this matter. The goal is to have the DART-6UL board (NXP i.MX6ULL processor) to behave as the I2C Master and the B-G474E-DPOW1 board having the STM32G474 microcontroller as the I2C Slave EEPROM. I guess I have to hook up an external I2C EEPROM to the B-G474E-DPOW1 board for testing out this process. 

 

Best Regards,

Gautam