The d002-nucleo-g431rb-control can demonstrate the expected behavior. This is the same logic, but it toggles LED for each time pushes B1 ( EXTI ). the HAL_EXTI_SetConfigLine() is working correctly. This project runs on the Nucleo-G431RB. ...
The subsequent pair of the HAL_EXTI_GetConfigLine() and HAL_EXTI_SetConfigLine() configures EXTI incorrectly. CubeIDE 1.3.0 F7 v1.16.0 The attached
STM32F7 HAL_EXTI_SetConfigLine() causes a Hard Fault whenever the parameter is one from the HAL_EXTI_GetConfigLine(). CubeIDE 1.2.1 STM32Cube FW_F7