cancel
Showing results for 
Search instead for 
Did you mean: 

BOOT pins on STM32F042k6 & SWD Programming (another 'can not connect to target')

natm
Associate II

I think I dove in a bit over my head.

I made a custom stm32f0 board that measures and logs a magnetometer through SD card and CAN. It was originally prototyped and tested on the nucleo stm32f042k6 and I tried to copy the essence of it into kicad and make the pcb. I broke out the SWDIO and SWCLK pins, but did not realize that I should've included the reset circuitry.

I tried flashing the board with the stlink v2 debugger/programmer and received the

Error in final launch sequence:
 
Failed to start GDB server
Failed to start GDB server
Error in initializing ST-LINK device.
Reason: (4) No device found on target.

message. Reviewed forums and learnt a lot of info that I should've researched before doing this :D and tried the following:

  • only had VDD (pin19), GND(pin20), SWDIO(7), and SWCLK(9) connected at first, so tried connecting VAPP, but have only tried connecting it to VDD (3.3v)
  • tried pulling down and pulling up NRST, and connecting NRST to ST Link
  • tried pulling down & pulling up BOOT0, which I believe is pin 31 on mcu.
  • tried switching DIO and CLK lines on stlink, and double checking pins
  • tried powering the board from external supply instead of VDD on st-link

The BOOT0 has caused me some confusion as it doesn't really seem to be a pin on the F042K6. I was able to find it in the resources easily. And the cubeide didn't have it as an option when configuring the peripherals.

Since the experimenting, I've stripped it all back down to be:

  • VDD, GND, SWDIO, SWCLK, & VAPP connected between stlink and pcb.
  • BOOT0 (pin 31) pulled to ground
  • NRST not connected

It is still not recognizing in CubeIDE or ST-Link Utilities, so I think maybe I messed up this board. I have another sensor to try, but just wanted to run this by anyone who might read it all to see if there's something I'm missing... I've attached the schematic for reference. (Would attach the pcb layout, but don't really know a good way to with kicad)

1 ACCEPTED SOLUTION

Accepted Solutions

From Data Sheet

PA8, PA9, PA10, PA11, PA12, PA13, PA14 and PA15 I/Os are supplied by VDDIO2.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3

From Data Sheet

PA8, PA9, PA10, PA11, PA12, PA13, PA14 and PA15 I/Os are supplied by VDDIO2.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
natm
Associate II

Connected Vddio2 to power and I was able to flash and debug over SWD. Next time I'll make sure to RTFM!

Well that's embarrassing..:>

Thanks for pointing that out, I will try adding that and report back