SX1276GenericLib to support sx1276 bassed LoRa modules, including HopeRF RFM95, Murata CMWX1ZZABZ and Semtech SX1276MB1MAS/SX1276MB1LAS modules

Dependents:   DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_PingPong DISCO-L072CZ-LRWAN1_LoRa_USB_Rx ... more

Fork of SX1276Lib by Semtech

Revision:
85:93832cc77534
Parent:
84:3428e25c7157
Child:
86:49d19df5bbce
--- a/Arduino-mbed-APIs/arduino-d21.cpp	Fri Aug 11 15:11:08 2017 +0200
+++ b/Arduino-mbed-APIs/arduino-d21.cpp	Sat Aug 12 19:16:08 2017 +0200
@@ -375,9 +375,6 @@
     if (SerialUSB_active) {
         __DSB(); // ensures the completion of memory accesses
         __WFI(); // wait for interrupt
-        // USB->CTRLA.bit.ENABLE = 0;
-        // USB->HOST.CTRLA.reg = 0;
-        // USB->HOST.CTRLA.bit.ENABLE &= USB_CTRLA_ENABLE;
     } else {
 #if  0 // (SAMD20 || SAMD21)
         /* Errata: Make sure that the Flash does not power all the way down
@@ -401,22 +398,28 @@
     SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk; // enable SysTick
 }
 
+/*
+ * TODO
+ * Check if we need to disable the USB GCLK->CLKCTRL.reg (see USBCore.cpp)
+ * Check what else we need to disable?
+ */
+
 void deepsleep(void)
 {
-#if  1 // (SAMD20 || SAMD21)
+#if  0 // (SAMD20 || SAMD21)
     /* Errata: Make sure that the Flash does not power all the way down
      * when in sleep mode. */
     NVMCTRL->CTRLB.bit.SLEEPPRM = NVMCTRL_CTRLB_SLEEPPRM_DISABLED_Val;
 #endif
 
-    SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk; // disbale SysTick
+    // SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk; // disbale SysTick
     
     SCB->SCR |=  SCB_SCR_SLEEPDEEP_Msk; // standby mode
     
     __DSB(); // ensures the completion of memory accesses
     __WFI(); // wait for interrupt
 
-    SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk; // enable SysTick
+    // SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk; // enable SysTick
 }
 
 #endif // D21 TCC Timer, sleep, etc-