Can not connect to target
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 5:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 5:32 AM
Hi guys, this is my first question on this community, I really did a lot of work on this pcb, I tried to make a custom made PCB board with the STM32F030RCT, So I tried to program the microcontroller with ST-LINKv2 programmer via SWD& SWDIO. I download the needed driver for the st-linkv2 but I still can not program the microcontroller, the output = 'Can not connect to target' using stm32CUBEIDE really tried everything to program it. I even tried the usb to uart cp2104 to program but even that did not work. All VCC are correct 3.3 Volts and there is no shortcircuit. I measured all VCC and the RST pin and boot0 pin and the capacitors are correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 5:42 AM
Make sure the part orientation is correct, Don't confuse ejector pin marks for pin 1 mark.
The external ST-LINK/V2 pod needs power on Pin 1 or 2 for the buffer logic.
The secondary signs-of-life method is to have BOOT0 High, and send an 0x7F data pattern at 9600 8E1 (Even Parity) and observe a 0x79 response.
Use RealTerm in Hex mode, and look at AN2606 for pins used by the boot loader.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 8:01 AM
The first signs-of-life methode1 : Pin 1 is marked here, is this right? The datasheet was bit confusing but this seems right to me? This seems to be right, I connected the 3.3V and GND as shown in the picture, also the SWDIO and SWCLK and reset pin.
The secondary signs-of-life methode2: Yes I did switches the BOOT0 pin to 3.3 Volts (see schematic label ResetUART). I measured the boot0 pin and its perfectly high if I place the jumper , if I remove the jumper it goes to zero volts for the SWDIO and SWD programming mode like in methode 1. So after downloading software and opening flash loader demonstrator , the responder does not connect on any bautrate or any parity mode, so I cant even connect it from the flash loader demonstrator.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 9:06 AM
I bought an ECS-320-12-36-CKM-TR crystal oscilator , and provided it with 2x 2pF capacitors. I was thinking Maybe the osscilation is not working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 2:09 PM
That part is just a crystal without oscillator circuit and 2 pF is almost definitely not enough for it. From popular values 18 pF could be the most appropriate one, or probably 15 pF. Read this:
https://blog.adafruit.com/2012/01/24/choosing-the-right-crystal-and-caps-for-your-design/
But the MCU starts with internal oscillator anyway, therefore it shouldn't matter at this point. Probably try 10k pull-down resistor for BOOT0 and disconnect 47k pull-up resistor from NRST like in AN4325 figure 9. Have you read that document? :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-09 4:38 PM
Ok, so chip doesn't seem to be functioning. Pin 1 looks to be correctly orientated.
Still most probably pins and/or power
The crystal isn't important for the ST-LINK or USART methods.
Check the state of the NRST pin, if it is always low, check the VDDA
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-10 6:31 AM
@Piranha A type fault of me , I mean I put two 12 pF capacitors, and yes that right it has to start with the internal oscillator anyway. Yes I have put an 100k resistor from BOOT0 to GND and disconnected 47k pull-up resistor from NRST but it still does not work, i even have a switch to reset the uC my self but even this does not work. VDDA=3.3V like it should be and NRST pin is 3.3 V high. NRST does not go low when I try to program it, with the oscilloscope on the NRST pin, the scope showed me the status with trigger mode, I can tell clearly that the reset pin does not go low when I send the program the the microcontroller, only if I reset the pin my self with the switch.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-10 6:41 AM
@Community member​ VDDA status as shown on figure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-01-10 2:45 PM
> Yes I have put an 100k resistor from BOOT0 to GND
I said 10k and that's what ST recommends.
> NRST does not go low when I try to program it
I thought you have connected it to the debugger's RST pin!?
