Starting from a brand new G071CB

If you made your own board, post here, unless you built a Maple or Maple mini clone etc
Post Reply
Posts: 5
Joined: Fri Jan 15, 2021 5:24 pm

Starting from a brand new G071CB

Post by Ooozair »

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 ( ... 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 ( ... 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?
User avatar
Posts: 912
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 36
Location: Le Mans

Re: Starting from a brand new G071CB

Post by fpiSTM »

Hi @Ooozair
About the variant, the next core release will provide a better way to manage the generic board support. Moreover, all mcu variant files has been generate to help users to create their own variant.
You can find the files here: ... C(6-8-B)Tx

I will fully rewrite the wiki and specify how to create the variant and board entries.

Moreover in the next core release 2.0.0, a new menu for STM32G0 will be added (available in this PR: ... /pull/1091)
So you will just need to add the generic for the STM32G071CB, the STM32G071Rx has been already added.

About the bring up, I'm not an hardware expert anyway before adding an external clock I would test with the internal one. Not that for HSE you need capacitors and resistor.
You can also check how it is wired on the Nucleo g071RB, it should be the same: ... ematic.pdf

Maybe you power is not good enough, 3.15V seems low.
This is what I have with a Nucle0 G071RB:
11:14:15 : STM32CubeProgrammer API v 2.6.0
11:14:27 : ST-LINK SN : 066DFF505250827867043428
11:14:27 : ST-LINK FW : V2J37M26
11:14:27 : Board : NUCLEO-G071RB
11:14:27 : Voltage : 3.23V

You can also update your STLink FW, it seems very old and know that several fixes has been made around G0 target.

Finally, I guess a schematics of your setup could help to find what is the problem.
Posts: 5
Joined: Fri Jan 15, 2021 5:24 pm

Re: Starting from a brand new G071CB

Post by Ooozair »

Thanks for the reply. Unfortunately, still no connection has been established.

I've reproduced the exact schematic shown in STM's Getting Started with G0 guide (Page 28, Figure 15) ... ronics.pdf

When I look a the Nucleo schematic, it shows several pins on the ST-Link that I don't have (TMS, STLK_RX, STLK_TX, MCO). I have one of those small ST-Link V2 devices, no bigger than a USB thumb drive- not the original large ST version. This works fine on my Bluepills, just not on this G071 yet.

I've tried using the ST-link's 3.3V output as well as the 5V output, and yet the terminal still indicates a target voltage of 3.17V. Not sure why this is. It reads this voltage if there's nothing connected at all too. Where is it it reading this voltage?

I've got the NRST pin connected to the SW-Link too now, and have tried all the permutations within the STMCube software. Sadly, no dice.

When I look online, tutorials using the F1 series make it seem as simple as connecting SWDIO and SWDCLK and connecting right away. I must be missing something obvious, but I know my schematic matches their example exactly. Anyone here ever put one of these chips on their own PCB/Breadboards?

EDIT: Here's the exact schematic of my current situation:

EDIT2: Was able to get this to work! I brought BOOT0 (SWCLK) to 0V with a jumper when powering on the board. Then, I removed the jumper, and was able to connect. Thank you!
Post Reply

Return to “Custom design boards”