2019-10-06 01:21 PM
I have a weird problem. I have the Nucleo board with a TLE493 magnetometer connected. When I connect the USB cable (power the system), file manager opens. If I then close the window, upload my SW using Atollic, my magnetometer code works fine, but if I don't use the debugger, initialization of TLE fails - the I2C HW is already "busy". (TLE starts interrupting via the I2C clock line).
What's different in the boots? The boot0-pin is low by default, and it hasn't been touched.
What code initializes the USB and what else does it do? I'm using I2C2 with PF1 as the clock line.
Solved! Go to Solution.
2019-10-10 03:54 AM
Hello,
please try to verify, if you're clearing I2C interrupt flags properly. It would explain why your code is running in debugger - debugger is reading out registers to display them to the user, and some flags are cleared using read access.
Best regards,
Lubos
2019-10-10 03:54 AM
Hello,
please try to verify, if you're clearing I2C interrupt flags properly. It would explain why your code is running in debugger - debugger is reading out registers to display them to the user, and some flags are cleared using read access.
Best regards,
Lubos
2019-10-10 12:27 PM
That I need to check! Thanks! That didn't think of.
I got the darn thing to work by initializing the TLE in the 'main' right after the HW initializations. Not good, but has to do for now.
I still want to fix that in a 'proper' way later.