HAL_GPIO_EXTI_Callback() defined multiple times, assume it is an error in CubeMX 6.2.0 - STM32F4 FW 1.26?
@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