[riot-notifications] [RIOT-OS/RIOT] drivers/sx126x: Add support for Nucleo -WL55JC (#16579)

Francisco notifications at github.com
Wed Jul 7 15:25:03 CEST 2021


@fjmolinas commented on this pull request.



>      sx126x_t *dev = (sx126x_t *)context;
 
-    gpio_set(dev->params->reset_pin);
-    gpio_clear(dev->params->reset_pin);
-    /* it takes 100us for the radio to be ready after reset */
-    ztimer_sleep(ZTIMER_USEC, 100);
-    gpio_set(dev->params->reset_pin);
+    if (sx126x_is_stm32wl(dev)) {
+#if IS_USED(MODULE_SX126X_STM32WL)
+        /* Reset Radio */
+        RCC->CSR |= RCC_CSR_RFRST;
+        /* Clear radio reset */
+        RCC->CSR &= ~RCC_CSR_RFRST;
+        ztimer_sleep(ZTIMER_USEC, 100);
+        /* Wait while reset is done */
+        while((RCC->CSR & RCC_CSR_RFRSTF) != 0UL) {}

Can you uncristify?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16579#pullrequestreview-701002134
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210707/9c64e9cf/attachment.htm>


More information about the notifications mailing list