STM32 I2C wont work without debugger
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-28 3:45 AM
Posted on August 28, 2013 at 12:45
Hi all!
Im currently working with a project that should read data from sensors using the I2C bus.When i am using a debugger to start the program it runs at it should. Reading sensor values and putting out the data on a CAN-bus. When i remove the debugger the MCU still behaves like it should.BUT, when i try to start the MCU after a reset (just pulling the plug) the MCU stops reading data from the sensors. Is there any background processes that the debugger prevents from running or runs that can make this error occure?Im using a stm32f107 and reading sensor data from an MPU-6050 and a HMC5883LKindest regardsJoel
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-27 8:56 AM
For me helps10ms delay before start communication on i2c.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-27 9:58 AM
If you're using the printf function in debugger mode, try commenting it out. I faced issues with it as well, but after removing printf, everything started working fine.

- « Previous
-
- 1
- 2
- Next »