2020-02-28 05:59 AM
STM32F7 HAL_EXTI_SetConfigLine() causes a Hard Fault whenever the parameter is one from the HAL_EXTI_GetConfigLine().
Following is the sample of the sequence. This code retrieve the EXTI configuration of the B1 ( User button ), clear the configuration, and then, set the configuration again.
hexti_b1.Line = EXTI_LINE_13;
HAL_EXTI_GetConfigLine(
&hexti_b1,
&hexti_b1_config
);
HAL_EXTI_ClearConfigLine(&hexti_b1);
HAL_EXTI_SetConfigLine(&hexti_b1, &hexti_b1_config);
In the API called line 7, a hard fault happen. I saw the source of the HAL_EXTI. It seems the pointer operation bug.
The attached nucleo-f746-exit is a demonstration code. If you run it, you will see the hard fault happen.
The other nucleo-g431 is for comparison. It runs on the Nucleo-G431 (64). It just work.