diff --git a/src/main/ibliniti2c.c b/src/main/ibliniti2c.c
index b17d5cd0170ee0a922d8d9a3ff32164eca4bd458..9d907125c0b89c50e1b56b66972dcdee72687484 100644 (file)
--- a/src/main/ibliniti2c.c
+++ b/src/main/ibliniti2c.c
* A global value is used to track the read through the i2c during
* the program load.
*/
-uint32 i2cReadAddress;
+uint32 i2cReadAddress, i2cBusAddress;
/**
* @brief
uint32 v;
for (;;) {
- while (hwI2cMasterRead (i2cReadAddress & 0xffff, /* The address on the eeprom of the table */
+ while (hwI2cMasterRead (i2cReadAddress, /* The address on the eeprom of the table */
4, /* The number of bytes to read */
iData, /* Where to store the bytes */
- i2cReadAddress >> 16, /* The bus address of the eeprom */
+ i2cBusAddress, /* The bus address of the eeprom */
IBL_CFG_I2C_ADDR_DELAY) /* The delay between sending the address and reading data */
!= I2C_RET_OK) {
continue;
- while (hwI2cMasterRead (i2cReadAddress & 0xffff, /* The address on the eeprom of the table */
+ while (hwI2cMasterRead (i2cReadAddress, /* The address on the eeprom of the table */
len, /* The number of bytes to read */
iData, /* Where to store the bytes */
- i2cReadAddress >> 16, /* The bus address of the eeprom */
+ i2cBusAddress, /* The bus address of the eeprom */
IBL_CFG_I2C_ADDR_DELAY) /* The delay between sending the address and reading data */
!= I2C_RET_OK) {
}
+ i2cBusAddress = i2cReadAddress >>16;
if (map.length != sizeof(iblBootMap_t)) {
iblStatus.mapSizeFail += 1;