Question
STM32F103 24LC128 EEPROM
Hi,
I am trying to write and read 64bytes data to 24LC128 eeprom with code below. For first64 bytes i can write and read clearly but the next values can not be written. What is wrong with me ? Any advises ?
HAL_I2C_Mem_Write(&hi2c1,(uint16_t)0xA0,0x00,I2C_MEMADD_SIZE_16BIT,save1,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Write(&hi2c1,(uint16_t)0xA0,0x0040,I2C_MEMADD_SIZE_16BIT,save2,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Write(&hi2c1,(uint16_t)0xA0,0x0080,I2C_MEMADD_SIZE_16BIT,save3,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Write(&hi2c1,(uint16_t)0xA0,0x00C0,I2C_MEMADD_SIZE_16BIT,save4,0x0040,1000);
HAL_I2C_Mem_Read(&hi2c1,(uint16_t)0xA0,0,I2C_MEMADD_SIZE_16BIT, save1,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Read(&hi2c1,(uint16_t)0xA0,0x0040,I2C_MEMADD_SIZE_16BIT, save2,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Read(&hi2c1,(uint16_t)0xA0,0x0080,I2C_MEMADD_SIZE_16BIT, save3,0x0040,1000);
HAL_Delay(25);
HAL_I2C_Mem_Read(&hi2c1,(uint16_t)0xA0,0x00C0,I2C_MEMADD_SIZE_16BIT, save4,0x0040,1000);