title: No Target Connected & Error: Flash Download Failed- Target DLL has been cancelled
body: <p>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. </p>
  
  <p>No Target Connected &amp; ERROR: Flash Download Failed - Target DLL has been cancelled.</p>
  
  <p>Few Methods i tried to solve this problems are:</p>
  
  <p><strong>1. Disconnecting the Device. making the BOOT0 High and connecting the device and erasing the chip.</strong></p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p><strong>2. Upgrading and Downgrading the ST-Link Firmware</strong></p>
  
  <p>Here after upgrading i got an ERROR: USB CONNECTION ERROR. SO i downgraded it again and came to the same place.</p>
  
  <p><strong>3. Following the steps from this YouTube video</strong></p>
  
  <p>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</p>
  
  <p><a href="https://www.youtube.com/watch?v=jEz0C2bT2M0" rel="nofollow noreferrer">https://www.youtube.com/watch?v=jEz0C2bT2M0</a></p>
  
  <p>I Almost tried everything and couldn't understand that where the problem reside. Is it with STM32 or ST-Link or some software issue.</p>
  
  <p>and sometimes i could erase the device but again after a min the same error occurs. I don't know whats going on.</p>
  
  <p>In all the above cases i used <em>"Connect under reset"</em> 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)</p>
  
  <p>Any Suggestions??</p>
  
  <p>Thanks in Advance.  </p>