[riot-notifications] [RIOT-OS/RIOT] cpu/sam0_common/spi: move out pin muxing into spi_acquire / spi_release (#14107)

Juergen Fitschen notifications at github.com
Wed May 20 17:41:46 CEST 2020


@jue89 commented on this pull request.



> @@ -92,9 +92,10 @@ void spi_init_pins(spi_t bus)
     gpio_init(spi_config[bus].miso_pin, GPIO_IN_PD);
     gpio_init(spi_config[bus].mosi_pin, GPIO_OUT);
     gpio_init(spi_config[bus].clk_pin, GPIO_OUT);
-    gpio_init_mux(spi_config[bus].miso_pin, spi_config[bus].miso_mux);
+    /* The out pins will be muxed during acquire and release.
+     * Otherwise these pins will get HIGH-Z during deep sleep of the MCU,
+     * which may leads to unexpected current consumption by SPI slaves. */

Whops. I swapped them! Input pins aren't problematic. Output pins are.
Thank you for the catch!

-- 
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/14107#discussion_r428114580
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200520/5cfacd63/attachment.htm>


More information about the notifications mailing list