2013-08-28 03:45 AM
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 regardsJoel2024-10-27 08:56 AM
For me helps10ms delay before start communication on i2c.
2024-10-27 09: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.