cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_GPIO_EXTI_Callback() defined multiple times, assume it is an error in CubeMX 6.2.0 - STM32F4 FW 1.26?

MarieMaurer
Associate III

@STM32 MCUs​

In our project we use USB_CDC. We don't use VBUS, disabled at all places in CubeMX, as far as I can see.

Now we want to add an external interrupt on PC0. I have done this.

CubeMX generates the following code, already before I added external interrupt:

usbd_conf.c

/**

* @brief Handle USB VBUS detection upon external interrupt

* @param GPIO_Pin

* @retval None

*/

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)

{

if (GPIO_Pin == GPIO_PIN_9)

{

HAL_PCDEx_BCD_VBUSDetect(&hpcd_USB_OTG_FS);

}

}

This function is needed to define a callback for the external interrupt.

Because I have disable VBUS, I assume this function shall not be in generated code?

I found the same bug report already a few times in forum, partly going back to 2018.

https://community.st.com/s/global-search/HAL_GPIO_EXTI_Callback?t=1616688548492

Why was it not yet fixed? The bug reports from the past are closed,

but how was the fix?

Best regards,

Marie

4 REPLIES 4
Khouloud ZEMMELI
ST Employee

Hello @Community memberurer​ 

Thanks for your feedback,

Could you please share your ioc file to check it?

Khouloud

MarieMaurer
Associate III

Hello Khouloud,

can you tell me if there is already an update on this topic? Can you confirm you have seen my sent files?

Best regards,

Marie

Hello @Community memberurer​ 

I have received you ioc file and you have right, issue is reproduced and it will be fixed (sorry for the delay).

Thanks for brining this problem to our attention and we are sorry for any inconvenience that may have caused.

Thanks for your contribution, Khouloud

Hi @Community memberurer​ 

I'm back again to inform you that issue is now fixed, you can use the latest available CubeMX version on site 🙂

Khouloud