summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMasterPhi <[email protected]>2021-07-21 10:29:47 +0200
committerMasterPhi <[email protected]>2021-07-21 10:29:47 +0200
commit5492d9148cbd09d19137b992f9ee51def9bd076f (patch)
treecb3816f6446f289b3e98f41ef3548e37ff25add4 /src
parent9c26c0c01e244310dc0e90573f39be7dc7250ead (diff)
Re-enable SETUP irq on EP0 stall.
Diffstat (limited to 'src')
-rw-r--r--src/portable/microchip/samx7x/dcd_samx7x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/portable/microchip/samx7x/dcd_samx7x.c b/src/portable/microchip/samx7x/dcd_samx7x.c
index 35d970b99..851978398 100644
--- a/src/portable/microchip/samx7x/dcd_samx7x.c
+++ b/src/portable/microchip/samx7x/dcd_samx7x.c
@@ -728,6 +728,11 @@ void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr)
(void) rhport;
uint8_t const epnum = tu_edpt_number(ep_addr);
USBHS->USBHS_DEVEPTIER[epnum] = USBHS_DEVEPTIER_CTRL_STALLRQS;
+ // Re-enable SETUP interrupt
+ if (epnum == 0)
+ {
+ USBHS->USBHS_DEVEPTIER[0] = USBHS_DEVEPTIER_CTRL_RXSTPES;
+ }
}
// clear stall, data toggle is also reset to DATA0