summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-05-11 20:02:48 +0700
committerGitHub <[email protected]>2021-05-11 20:02:48 +0700
commitc5e95a8f8d860152129a1a8f6882db16cb3fa17e (patch)
tree6e2905bcab1a874572bb1e83baf4071c55fbc761
parent59affc90aa429610561b151202073a717f84371f (diff)
parent9233269a2c97c9ca980276a288b1b225cb4d3825 (diff)
Merge pull request #829 from kasjer/kasjer/fix-build-for-nrf5340
Allow build for NRF5340 MCU
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index 6b8095a00..977ec6cdb 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -833,9 +833,8 @@ void tusb_hal_nrf_power_event (uint32_t event)
NRF_USBD->EVENTCAUSE = USBD_EVENTCAUSE_READY_Msk;
__ISB(); __DSB(); // for sync
- /* Enable the peripheral */
+#ifdef NRF52_SERIES
// ERRATA 171, 187, 166
-
if ( nrfx_usbd_errata_187() )
{
// CRITICAL_REGION_ENTER();
@@ -867,7 +866,9 @@ void tusb_hal_nrf_power_event (uint32_t event)
}
// CRITICAL_REGION_EXIT();
}
+#endif
+ /* Enable the peripheral */
NRF_USBD->ENABLE = 1;
__ISB(); __DSB(); // for sync
@@ -889,6 +890,7 @@ void tusb_hal_nrf_power_event (uint32_t event)
NRF_USBD->EVENTCAUSE = USBD_EVENTCAUSE_READY_Msk;
__ISB(); __DSB(); // for sync
+#ifdef NRF52_SERIES
if ( nrfx_usbd_errata_171() )
{
// CRITICAL_REGION_ENTER();
@@ -929,6 +931,7 @@ void tusb_hal_nrf_power_event (uint32_t event)
__ISB(); __DSB();
}
+#endif
// ISO buffer Lower half for IN, upper half for OUT
NRF_USBD->ISOSPLIT = USBD_ISOSPLIT_SPLIT_HalfIN;