Just upgraded the Keil 5.10 to 5.11 to have STM32L0 support.
When trying to debug my application I get: "st-link usb
communication error" and debug fails.
I have no problem connecting to my board using ST-Link
The 5.10 works fine - no issues with connecting to the
I use the latest ST-link drivers and firmware (STLinkUSBDriver.dll
v220.127.116.11, ST-LINK Firmware version : V2J21M5)
I tested some driver versions:
1. Keil 5.11 delivers STLinkUSBDriver.dll v18.104.22.168
The latest STLinkUSBDriver.dll is v22.214.171.124 does NOT help
Also the 5.10 STLinkUSBDriver.dll v126.96.36.199 does NOT help.
2. So I stayed with the Keil 5.11 STLinkUSBDriver.dll v188.8.131.52
and replaced the Keil 5.11 ST-LINKIII-KEIL_SWO.dll v184.108.40.206 with
the Keil 5.10 ST-LINKIII-KEIL_SWO.dll v220.127.116.11.
After this there is no USB errors - it successfully connect to the
It seems that something wrong is with ST-LINKIII-KEIL_SWO.dll
Unfortunatelly v18.104.22.168 cannot debug in SRAM when interupts are used
(I guess VTOC is not updated for some reason). When I update manually
I get write errors...
Anyway the Keil MDK team should look into the issue with the
With the old Firmware on ST-Link it works.
It must be the newest Keil Dll together with the ST-Link FW 21 which
leads to the problem.
Luckily i had enough old ST-link devices with Old FW
New devices like STM32L053 require the latest device firmware.
Tha latest MDK-ARM v5.11a is still affected by this issue.
It seems that Keil ignores this info.
This is a user venue, Keil has direct support channels, report
your issues via those.
I use free Keil version (32kB-limit version). Not sure if I am
entitled to use direct support channel. Probably not.
Anyone can send in bug reports. A bug in an evaluation version
will be just as important to close since
1) People hurt by it will think twice about buying a commercial
2) The bug is likely to also exist in the commercial editions.
The only problem is that the support is likely to receive a huge
number of user-error reports - and much more such reports from
students using the evaluation version and lacking experience with
Thank you for your suggestions.
I submitted the issue as a bug report.
Hello Bogdan Golab,
I think the new ST-Link FW (V2.J21.M5) causes trouble.
You can try to downgrade the FW to V2.J20.M4 with the
ST-LinkUpgrade.exe found in .\Keil\ARM\STLink .
I am using Keil 5.11 with a Nucleo-L053R8 board (ST-Link FW
V2.J20.M4) and I am able to Flash and debug, even in RAM.
Best Regards, Martin
Downgrading the firmware to the one supplied with the Keil tools
(ST-Link FW V2.J20.M4) did the trick here as well.
I have noticed the issue using STM32L053.
Thanks for a great advice guys. Indeed, downgrading from V2.J21.M5
to V2.J20.M4 solved the issue. I am using ST Nucleo F401RE with
STM32F401. Just for the convenience of others, if your Keil root
installation folder is C:\Keil_v5, then you will find out the
previous version of the firmware for ST-Link in your Keil
installation under C:\Keil_v5\ARM\STLink.
Hi, i have 32F429I Discovery kit and when i upgrade from V2.J20.S0
to V2.J21.S0 it stop working and message "USB communication error"
when trying to load in uVision always shows up. Downgrading to J20
helps! (Just run the STlinkupgrade in the directory in previous
I am encountered the same problem above and with the old Firmware on
ST-Link it works.So I downgrade it.
View all questions in Keil forum