2024-03-14 07:34 AM - last edited on 2024-03-14 09:18 AM by SofLit
Hello all .
I have been working for days to make nucleo f446re reads i2c eeprom .
The i2c eeprom am trying to read uses 0x78 address as the slave address .
I tried use the Nucleo-64 f446re with stm32 cube ide using IsDeviceReady in hal i2c . And i2c scanners from many different sources to try even to ensure that device is connected or not . With internal and external pullups but with no chance . I tried all hal i2c modes as interrupt mode or polling with no chance. My i2c eeprom part number is tiob46b1. And i did try to communicate with it using RPI 1 and it can easilly read it or detect it in i2c scanner. Arduino can really really easy communicate with it . I have tons of this eeproms with many projects i did with uno or esp8266 . For resetting some toners chip uses this unchanging address .
After searching many and many days . I found that f446re source in atm32 ide . Use this address as reserved for 10 bit addressing mode . And also for the RTC bkp register 10 in the stm32fxx.h file . Can any one help me . I also tried arduino ide softwire libraries or default pins .also cannot detect this address . Or loop on printing unknow problem on serial print . Full of bugs . Do i need to edit the whole source for company to read an i2c address or communicate with it . I think i wasted my money on that mcu . I need help because i said to my client that stm32 mcus is areally powerfull chips . And now am in trouble after spending client money without even wifi connection like the cheap esp8266
2024-03-14 08:37 AM
Repost from here:
HAL i2c 0x78 problem - STMicroelectronics Community
(I didn't reply because you still haven't shown the code that "doesn't work".)
Note that HAL except I2C addresses to be left-shifted. Perhaps try communicating with slave (0x78 << 1).
2024-03-14 09:15 AM
Actually the question has been posted like 5 times, several off-topic'd, with the same cut-n-paste
It's using 10-bit addressing, so the STM32 wants the 7-bit address in the high order bits, ie 0x78 << 1 is 0xF0
ie Binary pattern 11110xxY xxxxxxxx where x bits represents the 10-bit slave address, and Y is the read/write bit
You'd then send addressing offsets within the device you want to access. I'd expect the initial transaction to be 4-5 bytes to establish connection to a 10-bit I2C slave device, and the addressing within it.
I'm not using 10-bit devices, have none, and don't have any time invested in this, but it surely can't be too hard to formulate an I2C frame that can get to the slave device and work. It uses standard features/behaviours of the I2C bus, so as not to conflict with other hardware/devices.
If you're being paid to figure it out, figure it out. Put a bus analyzer on the devices/mcu's your familiar with, see what's happening, and pivot into the STM32 support, it's got to be a pretty short jog..
2024-03-14 06:24 PM
the code didnt work in this main.c file
is
bool readLexChip(I2C_HandleTypeDef *hi2c, uint16_t TenBits_slave_address, uint8_t firstRegisterByte, uint8_t secondRegisterByte ,uint8_t thirdRegisterByte, uint8_t *destinationBuffer, uint16_t readSize ){
and sorry if i slowly respond
work time and my children time
and again sorry if iam new to st community and very very tanks for replaying and careing even if not solving the problem
very thanks for you care
2024-03-14 06:26 PM
i needed to correct something i did wrong in old posts and i will remove it
sorry
and i asked for help
not for doing my work
i think sharing informations is not that heavy
if you dont need to help me
i think not responding will be abetter choice
god will send who with white heart for helping out there
and you go advice ppls what to do far from me