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

Akshai M (Augustus Diode) notifications at github.com
Wed Jul 7 17:56:39 CEST 2021


@akshaim 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) {}

I think I will do it once in a separate commit once all fixups are done :)

-- 
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#discussion_r665505511
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210707/cdd360f1/attachment.htm>


More information about the notifications mailing list