2015-02-01 02:22 PM
I just started playing with the USB code for the stm32f103c8. I found it quite impressive. It was the only tool I tried so far that was able to produce working code for a HID device that enumerated properly. However, I found a bug in the usb wake up interrupt handler. The code did not clear the EXTI 18 interrupt flag, resulting in a non stop repetition of the interrupt. This was not apparent until I tried to send a mouse report message. I fixed it by adding the highlighted line to the user section.
void USBWakeUp_IRQHandler(void)
{ /* USER CODE BEGIN USBWakeUp_IRQn 0 */__HAL_USB_WAKEUP_EXTI_CLEAR_FLAG(); /
/* USER CODE END USBWakeUp_IRQn 0 */ HAL_PCD_IRQHandler(&hpcd_USB_FS); /* USER CODE BEGIN USBWakeUp_IRQn 1 */ /* USER CODE END USBWakeUp_IRQn 1 */ }2015-02-05 12:44 AM
Hello,
Thank you for sharing issue and solution here. This issue has already been fixed on our side and will be available with MX release 4.7. Best regards