2013-04-16 11:53 PM
Since yesterday, i can't establish a ST LINK connection with my STM32L1-Discovery board. I've tried it in CrossWorks on my MacBook, the error was 'ST-LINK LOG'.
After that, I've tried it on my windows 7 pc with ST LINKv2 (downloaded from ST website) and also no luck. The last try was with Keil uVision, and the error was: 'no device connected'. Yesterday, i've tried to upload a new program into my Discovery board, after that moment, it went wrong. Probably a bad program. How can i (hard) reset my device?2013-04-17 12:52 AM
Well, you can try to do a mass erase with the ST Link Utility, which is a Windows software.
Or, if that fails, start into the ROM bootloader by pulling the BOOT0/BOOT1 pins, as described here multiple times. You can use the Flash Loader Demonstrator software for a mass erase.I've tried it in CrossWorks on my MacBook, the error was 'ST-LINK LOG'.
Usually, Crossworks un-defines the STARTUP_FROM_RESET macro by default in it's projects, which will make the board dependant on the debugger to startup. This causes some confusion in the unaware, but is a precaution exactly for those cases.
2013-04-17 04:47 AM
Thank you, problem is solved on a windows machine. ST LINK didn't work, but i've used STVP.
I also found the problem in my code that cause the problem. When i declare Port A pin 13 as a input, it goes wrong. anybody knows why? When i left PA13 out of my code, it is ok. (after reset my STM32L on a windows with STVP)2013-04-17 05:03 AM
PA13 = JTMS-SWDIO, ie part of the SWD / JTAG Debug interface, thus fails.
2013-04-17 05:05 AM
I also found the problem in my code that cause the problem. When i declare Port A pin 13 as a input, it goes wrong. anybody knows why?
When i left PA13 out of my code, it is ok. (after reset my STM32L on a windows with STVP)
This pin might be used for SWD, SWDIO to be precise. Just check the datasheet. I generally avoid to redesignate JTAG/SWD pins, if possible.
2013-04-17 05:25 AM
@ clive1 and fm.
Thank you for the info. That is the reason that my code fails. I will try to find another pin. Almost every pin is used now :)2013-04-17 05:42 AM
The mentioned Crossworks method should have avoided this trouble, as it kicks in immediately at the reset handler routine, before initialising any pins. Except, of course, you have speficied ''STARTUP_FROM_RESET'' for your project, to skip waiting for the debugger.