CubeMX deletes existing pin assignments without warning
- April 9, 2021
- 2 replies
- 2359 views
CubeMX ver 6.2.1 (and also 5.6.1). Start with a new project (STM32G474VE TQFP100 in the attached IOC file). Map pin PC10 to an EXTI function (in my case, falling edge with pull-up) and enable the NVIC EXTI15_10 interrupt. Make sure this pin is "pinned" (should be by default when EXTI function is selected). Then select pin PB10 and try to make it an EXTI function. CubeMX will do that and silently delete the PC10 information.
Yes, I know the SYSCFG->EXTICRx registers restrict it so you can only have one Port A/B/C/D/E/etc. pin 10 enabled as an EXTI. But CubeMX should not delete any pin configuration without some kind of warning, or at least not a "pinned" pin. Ideally, it should issue a warning and give the user the choice to keep the existing EXTI config and ignore the new one, or delete the existing one and create the new EXTI config.
