2021-01-29 05:15 AM
Hello,
I use SensorTile.box with Stm32L4R9 MCU, CubeMx 6.1.1, Cube FW L4 V1.16.0
I want to configure USB like a Virtual Com Port and it work's nice.
But, when I set USB_OTG_FS->Parameter Settings->Battery Charging to Enabled CubeMX generate's such code:
/**
* @brief Handle USB VBUS detection upon external interrupt
* @param GPIO_Pin
*/
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
HAL_PCDEx_BCD_VBUSDetect(&hpcd_USB_OTG_FS);
}
And it doesn't check any pin, so all the GPIO callbacks run this code.
I also tried to enable VBus pin, but it's still the same .
Tell me please if I am doing something wrong or it's a bug.
Thank you,
Anton
Solved! Go to Solution.
2021-02-02 08:30 AM
Hi @qqAnton ,
I confirm ,the check on the pin name is missing in the HAL_GPIO_EXTI_Callback function.
The issue is reported internally and will be fixed.
Thanks for raising this issue.
Houda
2021-02-02 08:30 AM
Hi @qqAnton ,
I confirm ,the check on the pin name is missing in the HAL_GPIO_EXTI_Callback function.
The issue is reported internally and will be fixed.
Thanks for raising this issue.
Houda
2021-07-25 03:15 PM
There is an even worse problem lurking here. HAL_PCDEx_BCD_VBUSDetect() calls HAL_Delay() from within an interrupt context. This causes any interrupt that has a lower priority than the GPIO interrupt to not get called while BCD is running.
Please provide a way for the user to disable the generation of this function.