AnsweredAssumed Answered

STM32F103C8, I2C1 with EEPROM_AT24C16C, it does not work T_T!

Question asked by SIRI.PISIT on Mar 1, 2017
Latest reply on Mar 5, 2017 by Nicolas Felipe

Initial Gencode : CubeMX : V4.19

IDE : KEIL       : V5.23.0.0 

HW : EEPROM : AT24C16C

 

minimum board STM32F103C8T6

HSE 72MHz

i pullup SDA, SCL with R 4k7 (PB7 & PB6)

Mode speed 100kHz

 

// this is my code.. //

my_i2c_status[0] = HAL_I2C_IsDeviceReady( &hi2c1,(uint16_t)0xA1,(uint16_t)10,3000);


my_dat[0] = 10;

my_dat[1] = 11;

my_dat[2] = 12;
my_get[0] = 0;

my_get[1] = 0;

my_get[2] = 0;


HAL_I2C_Mem_Write( &hi2c1,(uint16_t)0x00A0, (uint16_t)0, (uint16_t)8, my_dat, 3, 3000);
HAL_I2C_Mem_Read( &hi2c1,(uint16_t)0x00A1, (uint16_t)0, (uint16_t)8, my_get, 3, 3000);

 

my_get[0] =0 ,

my_get[1] =0 ,

my_get[2] =0 ,

It not change

T_T!

 

what is mistake in my code.

thank you very much

__/|\__

Outcomes