cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H723 Stuck after USB DFU Reset

pmark
Associate

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

2 REPLIES 2
TDK
Guru

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.

If you feel a post has answered your question, please click "Accept as Solution".

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();