Skip to main content
Martin Franke
Associate II
May 6, 2019
Solved

Bug in HAL_GPIO_DeInit(...) FW_H7 V1.4.0 for EXTI - Wrong Interrupt Pin De-Initialized

  • May 6, 2019
  • 3 replies
  • 909 views

I noted that when I call HAL_GPIO_DeInit is called (stm32h7xx_hal_gpio.c v1.4.0) the wrong External Interrupt get's de-initialized. After investigating further and comparing to the previous version I noted the following in the external interrupt de-init block: Everywhere the pin mask:

0x0FUL << (8U * (position & 0x03U))

appears, it should be changed to:

0x0FUL << (4U * (position & 0x03U))

like it was originally.

   /*------------------------- EXTI Mode Configuration --------------------*/

   /* Clear the External Interrupt or Event for the current IO */

   tmp = SYSCFG->EXTICR[position >> 2U];

   tmp &= (0x0FUL << (8U * (position & 0x03U))); // <-- Incorrect Here

   if (tmp == (GPIO_GET_INDEX(GPIOx) << (8U * (position & 0x03U)))) // <-- Incorrect Here

   {

    tmp = 0x0FUL << (8U * (position & 0x03U)); // <-- Incorrect Here

    SYSCFG->EXTICR[position >> 2U] &= ~tmp;

    /* Clear EXTI line configuration for Current CPU */

    EXTI_CurrentCPU->IMR1 &= ~(iocurrent);

    EXTI_CurrentCPU->EMR1 &= ~(iocurrent);

    /* Clear Rising Falling edge configuration */

    EXTI->RTSR1 &= ~(iocurrent);

    EXTI->FTSR1 &= ~(iocurrent);

   }

This topic has been closed for replies.
Best answer by Imen.D

Hello @Martin Franke​ ,

This reported issue is confirmed and will be fixed in the coming release of CubeH7.

Thank you for highlighting this.

Regards,

Imen

3 replies

ST Technical Moderator
May 7, 2019

Hello @Martin Franke​ ,

We will check this internally and come back to you soon with update.

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Imen.DBest answer
ST Technical Moderator
May 8, 2019

Hello @Martin Franke​ ,

This reported issue is confirmed and will be fixed in the coming release of CubeH7.

Thank you for highlighting this.

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Martin Franke
Associate II
May 8, 2019

Hello @Imen DAHMEN​ 

Thank you for verifying this so quickly!

Regards,

Martin