STM32G030 is support I2C master?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 5:42 AM - last edited on ‎2024-09-21 6:21 AM by Peter BENSCH
Have an issue with connection I2C sensor to STM32G030 chip.
Function HAL_I2C_IsDeviceReady alvais return HAL_ERROR.
Looks like this controller are not support I2C master, but documentation said:
Features of the I2C peripheral:
I2C-bus specification and user manual rev. 5 compatibility:
Slave and master modes, multimaster capability
Solved! Go to Solution.
- Labels:
-
I2C
-
STM32G0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 6:41 AM
Yes, of course it does I2C master.
HAL_I2C_IsDeviceReady returns HAL_ERROR if your device does not respond. Perhaps you are not using the correct slave address, or the slave is not powered or otherwise hooked up right. Slave addresses should be left-shifted by one bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 6:41 AM
Yes, of course it does I2C master.
HAL_I2C_IsDeviceReady returns HAL_ERROR if your device does not respond. Perhaps you are not using the correct slave address, or the slave is not powered or otherwise hooked up right. Slave addresses should be left-shifted by one bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 10:11 AM
It's looks strange because I checked on STM32F401 and there works fine, sensor detected. So, I know exactly the i2c sensor address and wires connected correct. Also checked signals SDA and SCL using oscilloscope, they show nothing. Looks like I2C are not started or it in slave mode and waiting for master start communication
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 10:48 AM
Add configuration screen of STM32G030.
Have a two boards with this chip and for both I2c are not worked.
Also add config of STM32F401. Where i2c works. There MASTER section present. In STM32G030 no MASTER section.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-21 5:20 PM
The peripheral is different and so the configuration screen is different. But it can be an I2C master. Perhaps share your code. What does HAL_I2C_IsDeviceReady return?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-09-22 1:04 AM
Found the issue. First one SDA pin was interrupted by jumper. Main purpose of this pin use for external oscillator, Second one, device address specified by manufacture need shift to one bit (((.
