[riot-notifications] [RIOT-OS/RIOT] drivers/dose: make use of start condition received interrupt (#16506)

Juergen Fitschen notifications at github.com
Fri Jul 16 13:34:28 CEST 2021


Thank you very much for improving DOSE and for your patience! I finally found some time to have look into your patch.

First of all: I've integrated the `samr30-xpro` into the DOSE net that already drives my home automation stuff.

I've modified the board configuration to switch from the internal RF interface to DOSE:

<details>

```diff
diff --git a/boards/samr30-xpro/Makefile.dep b/boards/samr30-xpro/Makefile.dep
index 4224c14c79..daafd22273 100644
--- a/boards/samr30-xpro/Makefile.dep
+++ b/boards/samr30-xpro/Makefile.dep
@@ -1,5 +1,5 @@
 ifneq (,$(filter netdev_default,$(USEMODULE)))
-  USEMODULE += at86rf212b
+  USEMODULE += dose
 endif
 
 ifneq (,$(filter saul_default,$(USEMODULE)))
diff --git a/boards/samr30-xpro/include/periph_conf.h b/boards/samr30-xpro/include/periph_conf.h
index b5b2add878..74a0cdf1fb 100644
--- a/boards/samr30-xpro/include/periph_conf.h
+++ b/boards/samr30-xpro/include/periph_conf.h
@@ -70,11 +70,22 @@ static const uart_conf_t uart_config[] = {
         .tx_pad   = UART_PAD_TX_0,
         .flags    = UART_FLAG_NONE,
         .gclk_src = SAM0_GCLK_MAIN,
+    },
+        {    /* EXT1 & EXT3 Pin Header */
+        .dev      = &(SERCOM1->USART),
+        .rx_pin   = GPIO_PIN(PA, 17),
+        .tx_pin   = GPIO_PIN(PA, 16),
+        .mux      = GPIO_MUX_C,
+        .rx_pad   = UART_PAD_RX_1,
+        .tx_pad   = UART_PAD_TX_0,
+        .flags    = UART_FLAG_NONE,
+        .gclk_src = SAM0_GCLK_MAIN,
     }
 };
 
 /* interrupt function name mapping */
 #define UART_0_ISR          isr_sercom0
+#define UART_1_ISR          isr_sercom1
 
 #define UART_NUMOF          ARRAY_SIZE(uart_config)
 /** @} */
@@ -127,15 +138,6 @@ static const spi_conf_t spi_config[] = {
  * @{
  */
 static const i2c_conf_t i2c_config[] = {
-    {    /* EXT1 & EXT3 Pin Header */
-        .dev      = &(SERCOM1->I2CM),
-        .speed    = I2C_SPEED_NORMAL,
-        .scl_pin  = GPIO_PIN(PA, 17),
-        .sda_pin  = GPIO_PIN(PA, 16),
-        .mux      = GPIO_MUX_C,
-        .gclk_src = SAM0_GCLK_MAIN,
-        .flags    = I2C_FLAG_NONE
-    }
 };
 #define I2C_NUMOF          ARRAY_SIZE(i2c_config)
 /** @} */
```

</details>

Some ping testing:

```
> ping ff02::1
2021-07-16 13:25:18,904 # ping ff02::1
2021-07-16 13:25:18,935 # 12 bytes from fe80::e449:92ff:fe1a:65f9%5: icmp_seq=0 ttl=64 time=23.336 ms
2021-07-16 13:25:18,950 # 12 bytes from fe80::5ca1:1dff:fe36:b359%5: icmp_seq=0 ttl=64 time=37.887 ms (DUP!)
2021-07-16 13:25:18,967 # 12 bytes from fe80::bcf3:1dff:fe6e:d30f%5: icmp_seq=0 ttl=64 time=55.049 ms (DUP!)
2021-07-16 13:25:18,981 # 12 bytes from fe80::d840:cbff:fee8:83c1%5: icmp_seq=0 ttl=64 time=68.777 ms (DUP!)
2021-07-16 13:25:19,037 # 12 bytes from fe80::9493:c4ff:fe86:83b1%5: icmp_seq=0 ttl=64 time=125.248 ms (DUP!)
2021-07-16 13:25:19,936 # 12 bytes from fe80::d840:cbff:fee8:83c1%5: icmp_seq=1 ttl=64 time=24.104 ms
2021-07-16 13:25:19,954 # 12 bytes from fe80::bcf3:1dff:fe6e:d30f%5: icmp_seq=1 ttl=64 time=41.261 ms (DUP!)
2021-07-16 13:25:19,968 # 12 bytes from fe80::5ca1:1dff:fe36:b359%5: icmp_seq=1 ttl=64 time=55.440 ms (DUP!)
2021-07-16 13:25:19,983 # 12 bytes from fe80::e449:92ff:fe1a:65f9%5: icmp_seq=1 ttl=64 time=70.096 ms (DUP!)
2021-07-16 13:25:20,037 # 12 bytes from fe80::9493:c4ff:fe86:83b1%5: icmp_seq=1 ttl=64 time=124.619 ms (DUP!)
2021-07-16 13:25:20,937 # 12 bytes from fe80::bcf3:1dff:fe6e:d30f%5: icmp_seq=2 ttl=64 time=24.374 ms
2021-07-16 13:25:20,937 # 
2021-07-16 13:25:20,940 # --- ff02::1 PING statistics ---
2021-07-16 13:25:20,947 # 3 packets transmitted, 3 packets received, 8 duplicates, 0% packet loss
2021-07-16 13:25:20,951 # round-trip min/avg/max = 23.336/59.108/125.248 ms
```

I've used printf debugging to verify that the start of a frame is actually sensed.

Your patch works as advertised! :)

-- 
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/16506#issuecomment-881381734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210716/5b02f0e3/attachment.htm>


More information about the notifications mailing list