STM32F302R8 I2C1 STUCK AT GENERATE START CONDITION
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-01 7:36 AM
Hi, I have a problem where my basic master send data code stuck at the generate start condition function. I am using STM32F302R8,
based on the reference manual, the flow chart stated that SET the I2C_CR2.START.
Then, inside my code, here is my basic code to send the data.
When it goes to inside MasterSendData(), It stuck in the GenerateStartCondition function.
Here is inside the GenerateStartCondition function and the start bit is register number 13.
But, after it finish executing the I2C_GenerateStartCondition, the register I2C_CR2_START does not SET, But, it looping inside the startup file of stm32f302r8 from CopyDataInit to LoopCopyDataInit as shown below.
So, I dont know what is the cause of this problem. Am I missing something in the setup? Hope someone can help me on this
- Labels:
-
I2C
-
STM32F3 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-01 8:00 AM
Isn't there a short, which causes the mcu to reset when it pulls down SDA/SCK?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-01 8:04 AM
The looping in the startup means the mcu reset? And it is because a short circuit? If there is a short circuit, why it happen during the generate start condition only? Not from the beginning of the program?​
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-01 9:06 AM
That was just a tip. You can check it using an ohmmeter. You can also check it using oscilloscope, measuring NRST, and/or power supply.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-06-01 3:39 PM
So the looping in the startup file is indicating what condition usually?​
