cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G030 CubeMX Switch between PB7/PB8/PB9/PC14-OCS32_IN - what does it mean?

Kazimierz Król
Associate III

Hi, I am designing a project based on STM32G030F6P CPU, and I have stumbled upon a feature that I have not seen in older STM32 CPUs. In the CubeMX under the SYS peripheral configuration there are several checkboxes named like "Switch between PB7/PB8/PB9/PC14-OCS32_IN". I could not find any information anywhere what these option do and how to use them.

I guess they are there to choose a particular port pin (and associated peripherals) on the physical pin, but I have no idea how to interpret switching between four values (pins) with a two-value selector (a checkbox). What do a checked state and unchecked state mean exactly?

There are also "Pin PA9 instead of pin PA11" - kind of checkboxes, and these are obvious. There is a register bit to replace PA11 with PA9 in the SYSCFG_CFGR1 (PA11_RMP). But I could not find any registers or bits that could be associated with the "Switch between" options.

5 REPLIES 5

> "Switch between PB7/PB8/PB9/PC14-OCS32_IN"

In both the TSSOP20 and SO8N packages, pads from the chip are bonded together onto a single pin (e.g. pin1 in STM32G030F6P is PB7+PB8). There's no explicit control for this on the chip, you have to treat them exactly as if you'd have separate pins on the larger packages physically connected, e.g. you are not supposed to set both as outputs and driving opposite levels.

So, presumably, this checkbox in CubeMX prevents CubeMX from generating code which would result in such conflicts. I don't use CubeMX.

JW

Thanks, but it seems unlikely to me. Pin 20 in this chip has four pins connected: PB3, PB4, PB5 and PB6. Of them only PB5 is mentioned in one of the checkboxes: "Switch between PA14-BOOT,PA15,PB5,PB8". So what would checking that mean? That the code won't be generated if I set PB5 and PB8 both to outputs? But PB5 and PB8 are on different pins, so that shouldn't be restricted.

The "PA14-BOOT,PA15,PB5,PB8" combination is for the SO8's pin 8. So maybe those checkboxes are not mean for the TSSOP-20 package.

JW

TDK
Guru

It has no effect on the generated code as far as I can see. I tried a few different configurations.

If you feel a post has answered your question, please click "Accept as Solution".

It may act before code generation, on the microxplorer/clicky part, i.e. it may influence whether multiple functions can/can't be assigned to the pin where multiple bonds land.

JW