2015-02-16 12:50 AM
Hello,
I have following problem, when I deinited PB4, using HAL_GPIO_DeInit function I lose the interrupt on PA4 pin. Reason: resetting SYSCFG->EXTICR[] values without checking port sources! LIbs: STM32Cube_FW_F4_V1.4.0 #hal_gpio_deinit #cube2015-02-19 10:02 AM
Hikrasutski.denis,
Please find below the change you need to apply to make this function work properly :/*------------------------- EXTI Mode Configuration --------------------*/
/* Configure the External Interrupt or event for the current IO */
tmp = SYSCFG->EXTICR[position >> 2];
tmp &= (((uint32_t)0x0F) << (4 * (position & 0x03)));
if(tmp == (GET_GPIO_INDEX(GPIOx) << (4 * (position & 0x03))))
{
tmp = ((uint32_t)0x0F) << (4 * (position & 0x03));
SYSCFG->EXTICR[position >> 2] &= ~tmp;
/* Clear EXTI line configuration */
EXTI->IMR &= ~((uint32_t)iocurrent);
EXTI->EMR &= ~((uint32_t)iocurrent);
/* Clear Rising Falling edge configuration */
EXTI->RTSR &= ~((uint32_t)iocurrent);
EXTI->FTSR &= ~((uint32_t)iocurrent);
}
We are aware of this limitation, and have already listed within the STM32Cube HAL bugs tracker, and it will be fixed in next releases of F4.
Thanks for the report.
Regards,
Heisenberg.