7 years, 4 months ago.

uVision MDK 5.2 using STM32L4 with STLink

Here are some tips to successfully debug with the latest MDK using the STM32L4 boards.

a) After importing the downloaded project to info uVision Select Project->Manager->Migrate to v5 Otherwise the STM32L4 boards are not available.

b) Flash/Debugging Error Problem/Workaround I got the following errors:

“Internal command error, Flash Download Failed, Target DLL has been canceled”

When the MCU is already loaded with an "mbed" binary which uses sleep or deepsleep the Keil STLink interface cannot connect to the target. The workaround is to press and hold the "Reset" button on the Nucleo board, issue to uVision flash or debug menu commands and release the reset buttom. This overcomes the problem.

c) The "mbed" sleep or deepsleep functions. The Debugger disconnects when the sleep or deepsleep functions are being used. I have not found any good workaround which means I need to have an forever idle loop in my app to allow debugging. I tried "WFI()" wait for interrupts instead but this also disconnects the debugger.

Question relating to:

Be the first to answer this question.