Просмотр исходного кода

correct errata check for nrf52840 first production

hathach 8 лет назад
Родитель
Сommit
d1ecef4fc3

+ 1 - 1
hw/mcu/nordic/nrf52/sdk/drivers_nrf/usbd/nrf_drv_usbd_errata.h

@@ -94,7 +94,7 @@ static inline bool nrf_drv_usbd_errata_type_52840_proto1(void)
 static inline bool nrf_drv_usbd_errata_type_52840_fp1(void)
 static inline bool nrf_drv_usbd_errata_type_52840_fp1(void)
 {
 {
     return ( nrf_drv_usbd_errata_type_52840() &&
     return ( nrf_drv_usbd_errata_type_52840() &&
-               ( ((*(uint32_t *)0xF0000FE8) & 0xF0) == 0x10 ) &&
+               ( ((*(uint32_t *)0xF0000FE8) & 0xF0) == 0x20 ) &&
                ( ((*(uint32_t *)0xF0000FEC) & 0xF0) == 0x00 ) );
                ( ((*(uint32_t *)0xF0000FEC) & 0xF0) == 0x00 ) );
 }
 }
 
 

+ 2 - 2
tinyusb/portable/nordic/nrf5x/hal_nrf5x.c

@@ -198,7 +198,7 @@ void tusb_hal_nrf_power_event (uint32_t event)
         // ERRATA 171, 187, 166
         // ERRATA 171, 187, 166
 
 
         // Somehow Errata 187 check failed for pca10056 1.0.0 (2018.19)
         // Somehow Errata 187 check failed for pca10056 1.0.0 (2018.19)
-        //if ( nrf_drv_usbd_errata_187() )
+        if ( nrf_drv_usbd_errata_187() )
         {
         {
           CRITICAL_REGION_ENTER();
           CRITICAL_REGION_ENTER();
           if ( *((volatile uint32_t *) (0x4006EC00)) == 0x00000000 )
           if ( *((volatile uint32_t *) (0x4006EC00)) == 0x00000000 )
@@ -262,7 +262,7 @@ void tusb_hal_nrf_power_event (uint32_t event)
       }
       }
 
 
       // Somehow Errata 187 check failed for pca10056 1.0.0 (2018.19)
       // Somehow Errata 187 check failed for pca10056 1.0.0 (2018.19)
-      //if ( nrf_drv_usbd_errata_187() )
+      if ( nrf_drv_usbd_errata_187() )
       {
       {
         CRITICAL_REGION_ENTER();
         CRITICAL_REGION_ENTER();
         if ( *((volatile uint32_t *) (0x4006EC00)) == 0x00000000 )
         if ( *((volatile uint32_t *) (0x4006EC00)) == 0x00000000 )