cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX deletes existing pin assignments without warning

Bob S
Principal

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.

2 REPLIES 2

Hello @Bob S​ ,

First let me thank you for your feedback and for the useful suggestion you gave, it will be taken into consideration.

Actually, as you have mentioned, only one source input can be selected for the EXTI10 external interrupt which explains the behavior of STM32CubeMX.

In fact, when trying to assign PB10 to GPIO_EXTI10 while PC10 is already mapped to the same signal, STM32CubeMX is not "deleting" PC10 information but rather changing EXTI configuration to match the new pin assignment.

With that said, I see your point and will bring it up internally and see how we can address this modification. I'll keep you posted with the updates.

Khouloud.

Bob S
Principal

Thank you for looking in to this. When I try this in CubeMX it DOES delete the entire configuration for PC10. PC10 was originally configured as an input, pull-up enabled and given a "user label". After setting PB10 to GPIO_EXTI10, PC10 is back to its default state. It does not appear in the "System Core"->GPIO table. Only PB10 appears there. And in the pinout view, PC10 is returned to a gray circle, meaning "not configured".