diff options
| author | Ha Thach <[email protected]> | 2022-06-28 20:36:04 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-06-28 20:36:04 +0700 |
| commit | c7fce32dffd0d6e6c94f030b037d476e16744153 (patch) | |
| tree | afa693d040996cf6fbb9f0d6856d6f9638e4451b | |
| parent | 3ead682af05bee3a275125f3e0384dd9b2882546 (diff) | |
| parent | bc4da2047bf73f81cfcd6daa9bd07901dcdff3c9 (diff) | |
Merge pull request #1535 from robert-hh/samd_xfer_lockup
samd: Fix a lock-up situation at high traffic.
| -rw-r--r-- | src/portable/microchip/samd/dcd_samd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c index 20dbde0f4..22fe32407 100644 --- a/src/portable/microchip/samd/dcd_samd.c +++ b/src/portable/microchip/samd/dcd_samd.c @@ -286,14 +286,14 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t { bank->PCKSIZE.bit.MULTI_PACKET_SIZE = total_bytes; bank->PCKSIZE.bit.BYTE_COUNT = 0; - ep->EPSTATUSCLR.reg |= USB_DEVICE_EPSTATUSCLR_BK0RDY; - ep->EPINTFLAG.reg |= USB_DEVICE_EPINTFLAG_TRFAIL0; + ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_BK0RDY; + ep->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL0; } else { bank->PCKSIZE.bit.MULTI_PACKET_SIZE = 0; bank->PCKSIZE.bit.BYTE_COUNT = total_bytes; - ep->EPSTATUSSET.reg |= USB_DEVICE_EPSTATUSSET_BK1RDY; - ep->EPINTFLAG.reg |= USB_DEVICE_EPINTFLAG_TRFAIL1; + ep->EPSTATUSSET.reg = USB_DEVICE_EPSTATUSSET_BK1RDY; + ep->EPINTFLAG.reg = USB_DEVICE_EPINTFLAG_TRFAIL1; } return true; |
