2019-04-16 08:11 AM
Hi all - I have got a prototype working on the Nucleo-F411RE and I am now trying to design my own custom board. I ordered an STM32F411RET6 MCU with an adapter board and have tried to wire it up with the following configuration from the ST-LINK V2 official programmer:
ST-LINK ==> MCU
PIN1 ==> VDD
PIN7 ==> PIN46 (SWDIO - Pulled up to VDD with 1K RES)
PIN9 ==> PIN49 (SWCLK - Pulled down to GND with 1K RES)
PIN13 ==> PIN55 (SWO)
PIN15 ==> PIN7 (NRST)
PIN19 ==> VDD (3.3V)
PIN20 ==> GND
I have also connected all the VDD and VDDA pins on the MCU to VDD and all the GND and GNDA pins to GND.
But when I try to program to the MCU using TrueStuio, I get the error "No device found on target".
I've spent the last 5 hours trying to research this and get it to work with no luck, can someone please share a wiring diagram or tell me what I'm doing wrong? Thanks so much!
2019-04-16 08:30 AM
Try without the pull resistors The STM32 pins already have appropriate pulls. Do not connect SWO and NRST as long as not really needed. Do not connect PIN19 if your target board has its own power , especially if target VDD is not 3.3 Volt. Try with the Stm32CubeProgrammer first. Does is read the target voltage?
2019-04-16 08:58 AM
Thanks for your fast reply!
I tried without the pull resistors initially and it didn't work. Neither did it without connecting SWO and NRST. My target board is just the MCU in LQP64 on a breakout board so I need the ST-LINK to power it. I have not tried it with Stm32CubeProgrammer, will do so tomorrow. I tried to connect to it using both truestudio and using the ST-LINK utility tool, but it wouldn't even connect.
2019-04-16 09:31 AM
"No device found on target" == Your design not functional, chip not starting/running.
What about the VCAP pin(s) and capacitors? What voltage do you see there?
Make sure you've got the pin orientation correct.
Try using USART1 PA9/PA10, with BOOT0 pulled high, send a 0x7F character at 9600 8E1, check for 0x79 response.
Make sure your design pulls BOOT0 low for normal operation.
2019-04-16 10:27 AM
Try your setup with some known working board.
2019-04-16 03:53 PM
I'm guessing it's the chip that isn't starting since I can't even connect to the MCU using the ST LINK utility. I can upgrade the firmware though, so the ST-LINK V2 should be fine. I will check the pin voltages later today. Good point on the pin orientation, I'll check that again as well.
Do I need to pull BOOT0 low or would the MCU do that by itself?
2019-04-16 03:54 PM
Like with the nucleo board after disconnecting the built-in programmer? Hmm, that's an idea, I'll see if that's doable. I've seen posts of folks doing it on the discovery board, but not on the nucleo yet.
2019-04-16 04:17 PM
>>Do I need to pull BOOT0 low or would the MCU do that by itself?
You need to have it pulled low to ensure proper operation and startup from FLASH.
2019-04-17 03:28 AM
I see - I'll give that a try now and see if it helps, thanks for your help! :)
2019-04-17 05:39 AM
I tried it out and it still doesn't recognise the device. When I connect with stm32cubeprogrammer, i get the following error when I hit connect:
20:30:53 : ST-LINK SN : 49FF6A068278535319481981
20:30:53 : ST-LINK FW : V2J33S7
20:30:53 : Voltage : 3.19V
20:30:53 : Error: No STM32 target found!
Here is my wiring schematic and a couple of pics of my setup.
I've been looking at the wiring diagram of the nucleo f411re and I think I'm matching it quite close. Just a few things that are missing on my setup:
Am I doing something fundamentally incorrect?
EDIT: Just checked the voltage on VCAP1, it's at 0.02V. Does that mean anything?