[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common: SPI: MOSI only operation & fix for adafruit-itsybitsy-m4 (#15846)

Dylan Laduranty notifications at github.com
Sun Jan 24 19:21:59 CET 2021


@dylad commented on this pull request.

> On adafruit-itsybitsy-m4 I would not get a signal on MOSI unless I also would mux the pin on acquire

What sorcery is this ??

Overall looks good but I'm wondering if this doesn't hide some weird bug on the hardware side of your board. 

>      /* Demux clk_pin back to GPIO_OUT function. Otherwise it will get HIGH-Z
      * and lead to unexpected current draw by SPI salves. */
     gpio_disable_mux(spi_config[bus].clk_pin);
+    gpio_disable_mux(spi_config[bus].mosi_pin);

Since you removed the gpio_init code, are we sure `gpio_disable_mux` will go back in GPIO_OUT mode ?

> @@ -395,6 +396,7 @@ void spi_release(spi_t bus)
     /* Demux clk_pin back to GPIO_OUT function. Otherwise it will get HIGH-Z

```suggestion
    /* Demux clk_pin and mosi_pin back to GPIO_OUT function. Otherwise it will get HIGH-Z
```

-- 
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/15846#pullrequestreview-574955331
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210124/ef262c61/attachment.htm>


More information about the notifications mailing list