diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c index e25b2474a8..0a566c9fea 100755 --- a/arch/arm/src/lpc17xx/lpc17_usbhost.c +++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c @@ -819,6 +819,17 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) priv->tdstatus = (TDHEAD->ctrl & GTD_STATUS_CC_MASK) >> GTD_STATUS_CC_SHIFT; +#ifdef CONFIG_DEBUG_USB + if (priv->tdstatus != 0) + { + /* The transfer failed for some reason... dump some diagnostic info. */ + + ulldbg("ERROR: TD CTRL:%08x/CC:%d RHPORTST1:%08x\n", + TDHEAD->ctrl, priv->tdstatus, + lpc17_getreg(LPC17_USBHOST_RHPORTST1)); + } +#endif + /* And wake up the thread waiting for the WDH event */ DEBUGASSERT(priv->wdhsem.semcount <= 0);