diff --git a/arch/arm/src/stm32/stm32_otgfshost.c b/arch/arm/src/stm32/stm32_otgfshost.c index 2c6bda6773..7451289b27 100644 --- a/arch/arm/src/stm32/stm32_otgfshost.c +++ b/arch/arm/src/stm32/stm32_otgfshost.c @@ -1906,6 +1906,14 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return (ssize_t)ret; } + + /* Wait a bit before retrying after a NAK. + * + * REVISIT: This is intended to give the CPU a break from + * the tight polling loop. But are there performance issues? + */ + + usleep(1000); } } else diff --git a/arch/arm/src/stm32/stm32_otghshost.c b/arch/arm/src/stm32/stm32_otghshost.c index 71f46ff4a3..85092d89a9 100644 --- a/arch/arm/src/stm32/stm32_otghshost.c +++ b/arch/arm/src/stm32/stm32_otghshost.c @@ -1911,6 +1911,14 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return (ssize_t)ret; } + + /* Wait a bit before retrying after a NAK. + * + * REVISIT: This is intended to give the CPU a break from + * the tight polling loop. But are there performance issues? + */ + + usleep(1000); } } else diff --git a/arch/arm/src/stm32f7/stm32_otghost.c b/arch/arm/src/stm32f7/stm32_otghost.c index 48e4418539..a89be679b9 100644 --- a/arch/arm/src/stm32f7/stm32_otghost.c +++ b/arch/arm/src/stm32f7/stm32_otghost.c @@ -1905,6 +1905,14 @@ static ssize_t stm32_in_transfer(FAR struct stm32_usbhost_s *priv, int chidx, return (ssize_t)ret; } + + /* Wait a bit before retrying after a NAK. + * + * REVISIT: This is intended to give the CPU a break from + * the tight polling loop. But are there performance issues? + */ + + usleep(1000); } } else diff --git a/arch/arm/src/stm32l4/stm32l4_otgfshost.c b/arch/arm/src/stm32l4/stm32l4_otgfshost.c index 33f283e167..a488825b9c 100644 --- a/arch/arm/src/stm32l4/stm32l4_otgfshost.c +++ b/arch/arm/src/stm32l4/stm32l4_otgfshost.c @@ -1910,6 +1910,14 @@ static ssize_t stm32l4_in_transfer(FAR struct stm32l4_usbhost_s *priv, return (ssize_t)ret; } + + /* Wait a bit before retrying after a NAK. + * + * REVISIT: This is intended to give the CPU a break from + * the tight polling loop. But are there performance issues? + */ + + usleep(1000); } } else