Starting from a brand new G071CB
Posted: Sat Feb 06, 2021 12:05 am
Hi everyone, caught in a bit of a head scratcher here.
Been using BluePills for some time now, and wanted to move on to putting some STM32 controllers onto my own PCBA's for a production part.
Decided to go with either the STM32G071CB or the STM32G070KB (depends on what my final pin requirement is going to be, as well as cost/availability). I'm likely to go with the G070KB.
However, I've got some G071CB's in my hand. But, I'm having trouble connecting to them through STM32Cube and an ST-Link V2
I'll describe my setup and what I've tried so far.
I've got the chip soldered to a breakout board to insert into a breadboard. I've check the solder connections, everything buzzes out on my ohmmeter correctly.
I've got an 8MHZ crystal going between pins 8 and 9 (PF0-OSC_IN and PF1-OSC_OUT) according to the spec sheet (https://www.st.com/resource/en/datashee ... g071cb.pdf)
I've got my STlink V2 connected- SWCLCK going to pin 36 (PA14-BOOT0) and SWDIO going to Pin 35 (PA13). The SWDCLK and SWDIO designations I found on the spec sheet. I'm supplying GND and 3.3V from the STLink
I've connected Pin 6 (VDD) to 3.3V, and Pin 7 (VSS/VSSA) to GND.
I've got a 10kΩ resistor pulling SWDCLK down, and a 10kΩ resistor pulling SWDIO up. I've also tried without these resistors.
My ST-Link V2 and STMCube work totally fine on all of my Bluepill devices. Now, when I try to Connect via STMCube, I get this in my output:
15:49:15 : ST-LINK SN : 3837130012144D43574D4E00
15:49:15 : ST-LINK FW : V2J29S7
15:49:15 : Board : --
15:49:15 : Voltage : 3.15V
15:49:15 : Error: No STM32 target found!
I've tried pulling NRST (pin 10) up and down, tried starting up with it pulled down then releasing it, tried all kinds of different combinations of startup and Pin 10 status. No dice.
When I check all pin voltages with my multimeter, Vref is 0V, but I see 3.3V on
I've also tried initiating a Full Chip Erase, thinking maybe all pins are defaulting to GPIO on a fresh chip and not interfacing SWDCLK and SWDIO but it says I have to be connected first (makes sense).
Could I get some guidance on what I need to do to set up a bare chip for first time use? Or, at least view that the chip is alive and well?
Some tutorial series (https://hackaday.io/project/25097-arm-m ... ial-series) indicate that there shouldn't be anything else to set up besides what I've already done, so I'm a little stumped here.
After that, looking ahead to the next step, I'll need to add a new chip variant to the STM32Duino folder. I've been following the instructions for that- I've successfully generated the appropriate variant.h, variant.cpp, PinNamesVar.h, and PeripheralPins.c. The wiki instructions were pretty clear- but I am a bit confused as to exactly what changes to make to boards.txt. The instructions weren't the most clear for that- it says to "copy a section that is similar" but I'm not sure what to copy, some of these sections are huge. Does anyone have any guidance on that too?
Been using BluePills for some time now, and wanted to move on to putting some STM32 controllers onto my own PCBA's for a production part.
Decided to go with either the STM32G071CB or the STM32G070KB (depends on what my final pin requirement is going to be, as well as cost/availability). I'm likely to go with the G070KB.
However, I've got some G071CB's in my hand. But, I'm having trouble connecting to them through STM32Cube and an ST-Link V2
I'll describe my setup and what I've tried so far.
I've got the chip soldered to a breakout board to insert into a breadboard. I've check the solder connections, everything buzzes out on my ohmmeter correctly.
I've got an 8MHZ crystal going between pins 8 and 9 (PF0-OSC_IN and PF1-OSC_OUT) according to the spec sheet (https://www.st.com/resource/en/datashee ... g071cb.pdf)
I've got my STlink V2 connected- SWCLCK going to pin 36 (PA14-BOOT0) and SWDIO going to Pin 35 (PA13). The SWDCLK and SWDIO designations I found on the spec sheet. I'm supplying GND and 3.3V from the STLink
I've connected Pin 6 (VDD) to 3.3V, and Pin 7 (VSS/VSSA) to GND.
I've got a 10kΩ resistor pulling SWDCLK down, and a 10kΩ resistor pulling SWDIO up. I've also tried without these resistors.
My ST-Link V2 and STMCube work totally fine on all of my Bluepill devices. Now, when I try to Connect via STMCube, I get this in my output:
15:49:15 : ST-LINK SN : 3837130012144D43574D4E00
15:49:15 : ST-LINK FW : V2J29S7
15:49:15 : Board : --
15:49:15 : Voltage : 3.15V
15:49:15 : Error: No STM32 target found!
I've tried pulling NRST (pin 10) up and down, tried starting up with it pulled down then releasing it, tried all kinds of different combinations of startup and Pin 10 status. No dice.
When I check all pin voltages with my multimeter, Vref is 0V, but I see 3.3V on
I've also tried initiating a Full Chip Erase, thinking maybe all pins are defaulting to GPIO on a fresh chip and not interfacing SWDCLK and SWDIO but it says I have to be connected first (makes sense).
Could I get some guidance on what I need to do to set up a bare chip for first time use? Or, at least view that the chip is alive and well?
Some tutorial series (https://hackaday.io/project/25097-arm-m ... ial-series) indicate that there shouldn't be anything else to set up besides what I've already done, so I'm a little stumped here.
After that, looking ahead to the next step, I'll need to add a new chip variant to the STM32Duino folder. I've been following the instructions for that- I've successfully generated the appropriate variant.h, variant.cpp, PinNamesVar.h, and PeripheralPins.c. The wiki instructions were pretty clear- but I am a bit confused as to exactly what changes to make to boards.txt. The instructions weren't the most clear for that- it says to "copy a section that is similar" but I'm not sure what to copy, some of these sections are huge. Does anyone have any guidance on that too?