cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error: ST-Link, no MCU device found session aborted

countach
Associate II
Posted on August 10, 2015 at 11:26

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.

7 REPLIES 7
Posted on August 10, 2015 at 14:52

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?

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on August 10, 2015 at 16:54

Hi Ben,

Try to remove the optimisation flag.

-shahrzad-

countach
Associate II
Posted on August 11, 2015 at 04:17

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.

Posted on August 11, 2015 at 04:49

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.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
jj2
Associate II
Posted on August 11, 2015 at 12:36

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...

countach
Associate II
Posted on August 12, 2015 at 03:37

Hi clive1:

Clearly. Thank you.

jj2
Associate II
Posted on August 12, 2015 at 17:10

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!'')