HAL_I2C_IsDeviceReady Always Returns HAL_BUSY when Connecting STM32 Nucleo F446ZE Board and MPU-9250
Hello,
I am currently facing an issue while attempting to establish communication between an STM32 Nucleo F446ZE development board and an MPU-9250 sensor using I2C protocol. I am utilizing the HAL_I2C_IsDeviceReady function from the Hardware Abstraction Layer (HAL) library to check the readiness of the I2C device (MPU-9250) before initiating communication. Regardless of the absence of a physical connection between the STM32 Nucleo F446ZE board and the MPU-9250 sensor, the HAL_I2C_IsDeviceReady function consistently returns HAL_BUSY as the status.
I have also tried to delete everything from the stm32 microcontroller memory using STM32 ST-LINK Utility, but it didn't help.
I think MPU9250 sensor is not a problem because when I connect it with Raspberry Pi 3 Model B via I2C communication protocol it works fine, I can read all sensor data and command for Raspberry terminal to detect i2c devices ' i2cdetect -y 1' returns the address of i2c on this sensor. But when I connect STM32 Nucleo F446ZE to Raspberry via I2C protocol, there is no any sigh of communication, command 'i2cdetect -y 1' doesn't return the memory address of I2C on STM32 board, it is just empty.
Function HAL_I2C_Mem_Read(&hi2c1, MPU9250_ADDRESS, MPU9250_WHO_AM_I, I2C_MEMADD_SIZE_8BIT, &who_am_i, 1, HAL_MAX_DELAY) returns 0x00.
I've generated the firmware code using STM32CubeMX.
Can you, please, help me with this problem? Do you have any idea what might cause this state and how to fix this?
Thank you!
