2018-05-13 11:35 AM
I'm new to stm32.
I would like to find write / read code I2C for the Adrafruit Fram MB85RC256V, with Keil + CubeMx.
Thank you very much in advance.
Bravos
2018-05-13 12:02 PM
Which STM32, there are like a dozen families, and hundreds of parts?
The HAL examples and BSP should contain multiple examples of using I2C peripherals and parts (touch screen controllers, EEPROMs, etc). Apply the I2C access routines to the specifics of your chosen part.
STM32Cube_FW_F4_V1.21.0\Drivers\BSP\STM32F401-Discovery\stm32f401_discovery.c
static void I2Cx_WriteData(uint16_t Addr, uint8_t Reg, uint8_t Value);
static uint8_t I2Cx_ReadData(uint16_t Addr, uint8_t Reg);
2018-05-13 02:23 PM
Thanks for the answer.
Right now I'm only interested in a stm family, which is stm32f103.
Bravos
2018-05-13 04:37 PM
That would be the original F1 family, bit antiquated at this point.
Download the CubeF1 package and review the board and example code in the trees.
2018-05-14 03:56 AM
Thanks Clive One
I'll unload the package and try to do something.
Bravos
2018-05-14 06:54 AM
the fram emulates a eeprom for the most part