2026-05-12 2:45 AM - edited 2026-05-12 2:47 AM
Hello Everyone,
I am working on a custom USB bootloader project on STM32H743 using:
My bootloader detects USB pendrive successfully and I can see:
But the system gets stuck / deadlocked when calling:
DIR dir;
if(f_opendir(&dir, "0:/") != FR_OK)
{
return UPDATE_NONE;
}The MCU hangs inside f_opendir() and never returns.
Current flow:
MX_USB_HOST_Init();
while(1)
{
MX_USB_HOST_Process();
if(Appli_state == APPLICATION_READY)
{
HAL_Delay(500);
update_flags = ver_check();
break;
}
}Inside ver_check():
if(f_mount(&USB_FatFs, USBHPath, 0) != FR_OK)
{
return UPDATE_NONE;
}
if(f_opendir(&dir, USBHPath) != FR_OK)
{
return UPDATE_NONE;
}Additional Information:
Has anyone faced f_opendir() blocking forever on H7?
Any guidance would be greatly appreciated.
Thank you.