HAL i2c 0x78 problem
iam using nucleo f446re for reading from and writing to i2c eeprom
on arduino i used to extrat the 7bit address from the 10 bit
using this core for that
void writeLexChip(uint16_t TenBits_slave_address, uint8_t firstRegisterByte, uint8_t secondRegisterByte, uint8_t thirdRegisterByte, uint8_t *contentBuffer, uint16_t writeSize) {
ChipOn();
uint16_t slave_address_LSB = TenBits_slave_address & 0x0FF;
uint16_t slave_address_MSB = TenBits_slave_address & 0x300;
slave_address_MSB = slave_address_MSB >> 8;
uint8_t SevenBits_compat_address = 0x78 | slave_address_MSB;
contentBuffer[0] = slave_address_LSB;
contentBuffer[1] = firstRegisterByte;
contentBuffer[2] = secondRegisterByte;
contentBuffer[3] = thirdRegisterByte;
Wire.beginTransmission(SevenBits_compat_address);
Wire.write(contentBuffer, 4 + writeSize);
Wire.endTransmission(true);
Serial.println(F("Write OK"));
ChipOff();
}
on stm32 cube ide i worked for many many weeks for even show the i2c address on any i2c scanner source on internet
or try to make one
try to use for (i=o i<127; i++)
time 127 and time 177 like some arduino codes
the nucleo f446re totally refuse to show 0x78 address while it is so easy to do that using eso8266 or arduino uno or nano or any other trademark
i used HAL isdevice ready
mem read
i2c master recive
with all possible ways
like using software i2c on arduino with this board
using internal pullups or external
and then i found that this address is reserved for RTC BKP register 10 in the stm32fxx.h file
can i avoid that or change the reserved address in the source
can any one help me please
