Skip to content
This repository was archived by the owner on Jan 29, 2024. It is now read-only.

Commit 3be6c23

Browse files
authored
Merge pull request #2 from dnbdmr/dont_clear_epcfg
Don't clear EPCFG after EORST interrupt
2 parents 2551fa5 + 886d852 commit 3be6c23

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

bootloader.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ static void USB_Service(void)
9999
USB->DEVICE.INTFLAG.reg = USB_DEVICE_INTFLAG_EORST;
100100
USB->DEVICE.DADD.reg = USB_DEVICE_DADD_ADDEN;
101101

102-
for (int ep = 0; ep < USB_EPT_NUM; ep++)
103-
USB->DEVICE.DeviceEndpoint[ep].EPCFG.reg = 0;
104-
105102
USB->DEVICE.DeviceEndpoint[0].EPCFG.reg = USB_DEVICE_EPCFG_EPTYPE0(1 /*CONTROL*/) | USB_DEVICE_EPCFG_EPTYPE1(1 /*CONTROL*/);
106103
USB->DEVICE.DeviceEndpoint[0].EPSTATUSSET.bit.BK0RDY = 1;
107104
USB->DEVICE.DeviceEndpoint[0].EPSTATUSCLR.bit.BK1RDY = 1;

0 commit comments

Comments
 (0)