cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot program STM32F070F6P6TR 20-pin MCU bare chip using uVision5

JFakh.1
Associate

Hi all,

I purchased STM32F070F6P6TR chip from digikey and I am attempting to program it using ST-Link V2. Below are images of the basic schematic just to be able to download something to it.

0693W000001qfnCQAQ.jpg

The first thing I usually do when I get an ST MCU is use the utility tool and attempt to erase it to verify its operation. But every time i attempt to erase it, I get "Cannot connect to the target. Please select Connect Under Reset mode and try again".

The image below shows the utility settings.

0693W000001qfn2QAA.jpg

Also, when I attempt to flash it using uVision 5, I get the messages...

"No target connected"

"Error: Flash download failed - Target DLL has been cancled"

Below are images of the flash configuration in uVision 5.

0693W000001qfnRQAQ.jpg

0693W000001qfnWQAQ.jpg

I have tried many of the solutions found on the internet and the community. I have also tried another chip, but without any resolution.

Pleas help me get this STM32F070F6P6TR started.

3 REPLIES 3
moatjon
Associate III

Hello JFakh.1,

First of all I notice that your NRST and BOOT0 pin are left floating in your schematics! In general, you'll want to pull the NRST pin up and add something like a 100nF capacitor between the NRST pin and GND. The BOOT0 pin should be pulled to ground unless you want your program to run from anywhere except main flash memory, which is probably not the case.

Looking at your ST-LINK configuration, in the Mode field you have selected Hot Plug, which is used to connect to a device while it's already running, without halting or resetting the device, which is probably also not what you want here.

I'd recommend adding a pull-up resistor (between 10kΩ - 100kΩ will do) to the NRST pin and connecting a 100nF ceramic capacitor between this pin and GND. I would also place a pull-down resistor between BOOT0 and GND. After adding these components, try connecting using Software Reset instead of Hot Plug.

JFakh.1
Associate

Thank you for the response.

I performed the recommendation you mentioned. But this has made no difference.

0693W000001qjIwQAI.jpg

0693W000001qjJLQAY.jpg

Let me ask you this.

  • Do all STM32 chips come loaded with a bootloader?
  • Do I need an external oscillator?
moatjon
Associate III
  • All STM32 chips (as far as I know) come with a bootloader, but as you're uploading using SWD you don't need to use a bootloader.
  • You can use an external oscillator to get better clock performance, but it is not necessary to flash or boot your chip.

The Detection Fail message in Keil bothers me a bit, can you try connecting to your MCU using STM32CubeProgrammer? That should show some more detailed error messages as well. You may also need to update your ST-LINK firmware, which can be done with STM32CubeProgrammer.