STM32H723 Stuck after USB DFU Reset
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-18 6:02 AM - last edited on ‎2025-03-18 6:05 AM by mƎALLEm
STM32H723 get stuck after a successful USB DFU download / reset in the HAL_Delay() in MX_USB_DEVICE_Init();
I can fix it by moving MX_IWDG1_Init(); before MX_USB_DEVICE_Init(); so the watchdog resets the device, but is there a way so this does not happen ?
We don't see it after a power cycle but have seen it during development when reloading the debugger
- Labels:
-
STM32H7 Series
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-18 7:31 PM - edited ‎2025-03-18 7:32 PM
The program probably expects peripherals to be in their after-reset state. How are you moving from USB DFU bootloader to the program?
Perhaps in the program you should detect if USB DFU was active, perhaps by looking at USB peripheral, and reset if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-03-19 10:13 AM
After the flashing command i send this
dfu-util -d 0483:df11 -a 0 -e -R
and it jumps to the application code but gets stuck
so i tried adding this and it seems to work, is there any chance it could get into a endless loop or is there a better way to know that it was a jump from the DFU bootloader ?
int main(void)
{
/* USER CODE BEGIN 1 */
if(READ_REG(RCC->D2CCIP2R))
NVIC_SystemReset();
