Associate II
June 23, 2026
Solved
ST25R100 always ends up in error handler
- June 23, 2026
- 3 replies
- 32 views
Hello,
I have a STM32F401RCT connected to a ST25R100.
In the ioc file I enabled the X-CUBE-NFC9 library with all the necesary dependencies.

All the IOs also have pins assigned to them.
Plus Pull ups enabled on the IRQ (open drain) and NFC_Reset.
Currently I have found out that it crashes somewhere after MX_X_CUBE_NFC9_Init();
ret code: 0
NFC BSP COM = 100
Welcome to X-NUCLEO-NFC09A1
entered error handler
This is what I get in my console. I added some printfs in the code already.
When I run it in debug mode to check were it calls the error handler it for some reason does not hit the error handler but it gets stuck in stm32F4xx_il_usb.c; when I click pauze, this seems rather odd.
HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num)
{
__IO uint32_t count = 0U;
/* Wait for AHB master IDLE state. */
do
{
count++;
if (count > HAL_USB_TIMEOUT)
{
return HAL_TIMEOUT;
}
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_AHBIDL) == 0U);
/* Flush TX Fifo */
count = 0U;
USBx->GRSTCTL = (USB_OTG_GRSTCTL_TXFFLSH | (num << 6));
do
{
count++;
if (count > HAL_USB_TIMEOUT)
{
return HAL_TIMEOUT;
}
} while ((USBx->GRSTCTL & USB_OTG_GRSTCTL_TXFFLSH) == USB_OTG_GRSTCTL_TXFFLSH);
return HAL_OK;
}Are there any debugging tips on what I can do next to figure this issue out?

