cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C092FCP6 SPI, SCK Pin remapping by CubeMX

CBa
Visitor

Hello,

when doing code generation by CubeMX, it seems, that there's no Pin-remapping done in certain cases, at STM32C092FCP6.

In my case, I chose SPI2 in master full-duplex mode. SPI2_CLK is on PB8 at Pin1. A remapping from PB7 to PB8 has to be done by setting PINMUX4 in SYSCFG->CFGR3 register. I thought this would be done by CubeMX code generation, but i didn't.

 

The same is with SPI1 SCK, at Pin 20 with PB6/PB3.

 

Is this the desired behaviour?

Screenshot 2025-09-04 155052.png

1 REPLY 1
TDK
Super User

Seems like CubeMX assumes SECURE_MUXING_EN=0.

Previous chips like this (with shared pins) don't have a SECURE_MUXING_EN option bit and the pins are tied to each other all of the time. In that case, CubeMX does the correct thing.

 

Probably CubeMX should have this functionality to configure CFGR3 correctly but it just doesn't look to be coded.

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