1
votes

I am stuck with a weird problem with STM32F103RC and ST-Link V2. Whenever i try to flash a program to my stm there is this error.

No Target Connected & ERROR: Flash Download Failed - Target DLL has been cancelled.

Few Methods i tried to solve this problems are:

1. Disconnecting the Device. making the BOOT0 High and connecting the device and erasing the chip.

What happens in this case is Chip is erased at first. Then i could Flash the program. But again after few mins if i try to flash the same error occurs.

At first i though there was some problem with the code (as i was doing SPI) so i wrote a simple Blink LED code using HAL Library but same thing occurred. So i thought there might be some problem with the HAL library so i wrote the whole code using CMSIS core but same thing occurs.

2. Upgrading and Downgrading the ST-Link Firmware

Here after upgrading i got an ERROR: USB CONNECTION ERROR. SO i downgraded it again and came to the same place.

3. Following the steps from this YouTube video

I found this great video in YouTube from NewbieHack. Here basically what he did was to reset the device and erase the chip. I also followed the same steps but nothing happened. Here is the link of the video

https://www.youtube.com/watch?v=jEz0C2bT2M0

I Almost tried everything and couldn't understand that where the problem reside. Is it with STM32 or ST-Link or some software issue.

and sometimes i could erase the device but again after a min the same error occurs. I don't know whats going on.

In all the above cases i used "Connect under reset" option form target->settings. Although i have explored all the options but nothing seems to work and PC is running on windows 10(if it's imp)

Any Suggestions??

Thanks in Advance.

1
Do not watch YT videos. Check the cables. USB connection error means exactly this. Your programmer was not properly enumerated or driver failed. Do not do any "magic" with the boot pins as they re for the completely different purposes. BTW it a quite common problem withe cheap Chinese ST-Link copies.0___________
@PeterJ_01 I have checked and rechecked the cables and drivers, uninstalling the drivers and installing them.. tried different versions of driver nothing is working... at last magic with the boot pins worked but just for single time. Is there any solution to this problem or i need to change stm or st link? Thanks for your replyDevjeet Mandal

1 Answers

0
votes

if you using STM32CUBE, in SYS select serial wire debug.