Hello,
I would like to know how to configure I2C with MCU STM32L5. Thank you for your helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-28 2:16 AM
I have a CODEC SGTL5000, I need to communicate by I2C but I have an error I don't know if it comes from hardware or software?
Thank you for your help
- Labels:
-
I2C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-02-28 2:33 AM
Hello @DYann.1​ ,
Please refer to the wiki : Getting started with I2C - stm32mcu
Check results via an oscilloscope and Read/Write registers.
If nothings appears, please check the error flags set in the status register.
Try to get the error (HAL_I2C_GetError)
If the error is :
- OVR, ARLO, NACK : you can just do a Transmit again
- BERR : You have to re-enable the peripheral
If you are facing some erratic behavior on STM32, do not forget to check Errata sheet of the device. There are few points related to I2C interface.
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 12:21 AM
Hello @KHALSI_Foued,
I have now another error, it hasn't happened before :
what does it mean that the target is not available ? I'm stuck at this line
Something was wrong with my SysTick ? How to check my SysTick if it's working properly ?
Thank you for your answer.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 12:42 AM
Hi,
Sorry now I can locate the error :
HAL_I2C return 1 as error What does that mean ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 12:55 AM
Hi,
I think I gave a wrong address for the CODEC.
Normally after the DS
After me the Adress is 10 (dec).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 1:45 AM
Hello,
Please check results via an oscilloscope. (Maybe it can be not the correct Address)
Foued
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-03-01 5:22 AM
Hi,
I've a evaluation board STM32L552E-EV and after the PCB :
I check the pin 7 and I have nothing SCL and nothing either and nothing either for the SDA pin. How it's possible ?
