Skip to content

Commit

Permalink
stm32_otgfsdev: avoid a fault on a bad epnum USB RX interrupt
Browse files Browse the repository at this point in the history
this just avoids the fault, but doesn't really fix the underlying
cause. Needs some discussion with David Sidrane
  • Loading branch information
tridge committed Apr 24, 2015
1 parent ff60694 commit d42937c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nuttx/arch/arm/src/stm32/stm32_otgfsdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,6 +3123,14 @@ static inline void stm32_rxinterrupt(FAR struct stm32_usbdev_s *priv)
/* Decode status fields */

epphy = (regval & OTGFS_GRXSTSD_EPNUM_MASK) >> OTGFS_GRXSTSD_EPNUM_SHIFT;
if (epphy >= STM32_NENDPOINTS) {
/*
on PH2 we are seeing a value of 8 here, with STM32_NENDPOINTS
at 4. When this happens regval is 0xb4e48168. This is a
workaround until David Sidrane can take a look.
*/
return;
}
privep = &priv->epout[epphy];

/* Handle the RX event according to the packet status field */
Expand Down

0 comments on commit d42937c

Please sign in to comment.