2015-08-10 02:26 AM
Hi
When I configure the I2C to my code, my code is only using TSC, RTC, timer2 and sixteen GPIO. I compiler it that variable parameter is became ''unavailable'' in live watch windows. After that, I want to leave debug mode. IAR shows error about ''Fatal error: check that all cables are connected and power is OK.'' And compiler it again, IAR will show ''Fatal error: ST-Link, no MCU device found session aborted.'' I use STVP program to erase it and remove ST-link to compiler again. IAR will let me compiler. But, it still show ''unavailable''. I use STVP again and comment the line of I2C configuration to recover my code. It works normally. And, I try to change the I2C port and do above way. IAR can run, but live watch windows show all of the parameter is 0. I use STM32F3 discovery board. MCU has selected to STM32F303xC. I have no idea to handle this issue. Please help me. Thank you.
2015-08-10 05:52 AM
Are you reconfiguring the GPIO pins related to the SWD debug interface (ie PA13/14), to a lesser extent PB3?
Are you using any of the low power modes?2015-08-10 07:54 AM
Hi Ben,
Try to remove the optimisation flag. -shahrzad-2015-08-10 07:17 PM
Hi clive1:
I check the datasheet. I used I2C1 port PA14 and PA15. I occupied the SWD port. And, I change the I2C1 to I2C2 that work normally. But, I don't understand what's meaning about ''a lesser extent PB3''? Thank you for your help.2015-08-10 07:49 PM
PB3 is part the JTAG pins, and on SWD connections is used as the SWO (Serial Wire Output) pin, it's used by the Trace/Viewer in the debugger, optionally. The clock and data pins are critical, you break those, and you have no connectivity.
2015-08-11 03:36 AM
Clive1 - as usual - nailed your issue. (you most likely altered one/both of the SWD pins.)
And earlier today - so did we! And we just fixed it - and due to our shared use of IAR - so can you...
I don't believe ''optimizations is your issue'' - instead follow ''Projects > Options > ST Link (that's 3rd from the bottom) and then click upon ''Reset.'' Drop down reveals, ''Connect during Reset'' - and Eureka - if you have proper code to download you'll be back, ''On the Air!''
You/others may note that the normal/customary SWDIO pin (PA13 in our case) should normally be pulled up when operation is proper. While we were ''locked out'' today that voltage was near 0V - and returned to 3V0 after we followed the procedure just described...
2015-08-11 06:37 PM
Hi clive1:
Clearly. Thank you.2015-08-12 08:10 AM
What's clear?
Might you be good enough to comment upon the detailed suggestion describing the use of IAR to, ''Download while in Reset'' which (likely) recovered your MCU? (such remains very much, ''unclear!'')