2017-09-12 05:52 AM
2017-09-13 01:25 AM
I have solved the problem by changing these functions:
HAL_I2C_Mem_Read_DMA(&hi2c1, (uint16_t)EEPROM_ADDRESS, 0, I2C_MEMADD_SIZE_16BIT, (uint8_t *)aRxBuffer, RXBUFFERSIZE)
HAL_I2C_Mem_Write_DMA(&hi2c1 , (uint16_t)EEPROM_ADDRESS, Memory_Address, I2C_MEMADD_SIZE_16BIT, (uint8_t*)(aTxBuffer + Memory_Address), EEPROM_PAGESIZE)
to these ones:
HAL_I2C_Mem_Read(&hi2c1, (uint16_t)EEPROM_ADDRESS, 0, I2C_MEMADD_SIZE_16BIT, (uint8_t *)aRxBuffer, RXBUFFERSIZE, 0x10)
HAL_I2C_Mem_Write(&hi2c1 , (uint16_t)EEPROM_ADDRESS, Memory_Address, I2C_MEMADD_SIZE_16BIT, (uint8_t*)(aTxBuffer + Memory_Address), EEPROM_PAGESIZE, 0x10)
Also, I changed the EEPROM address to:
#define EEPROM_ADDRESS (0x50<<1)
I still don't understand why the example proposed by ST doesn't work in with the evaluation board I'm using.