2025-09-04 6:57 AM
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?
2025-09-04 7:22 AM
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.