[riot-notifications] [RIOT-OS/RIOT] boards/nucleo-f767zi: Fix SPI config (#13861)

Alexandre Abadie notifications at github.com
Tue May 19 14:53:30 CEST 2020


@aabadie commented on this pull request.



> @@ -118,7 +118,7 @@ static const uart_conf_t uart_config[] = {
 static const spi_conf_t spi_config[] = {
     {
         .dev      = SPI1,
-        .mosi_pin = GPIO_PIN(PORT_A, 7),
+        .mosi_pin = GPIO_PIN(PORT_B, 5),

```suggestion
#ifndef MODULE_PERIPH_ETH
        /* PA7 is also used by the Ethernet device, only use it */
        /* if the Ethernet features is not used to keep the */
        /* Arduino pinout compatibility */
        .mosi_pin = GPIO_PIN(PORT_A, 7),
#else
        .mosi_pin = GPIO_PIN(PORT_B, 5),
#endif
```

The other solution is to add:
```mk
FEATURES_CONFLICT += periph_eth:periph_spi
FEATURES_CONFLICT_MSG += "The Ethernet device and SPI configured on Arduino pinout share the same pin."
```
in the board `Makefile.features` but it's more static => one cannot use both SPI and Eth in the same application unless commenting out the lines in the Makefile and reassigning the MOSI pin in the config.

Personally, I prefer the first solution.

-- 
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/13861#pullrequestreview-414412935
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200519/9e6ff019/attachment-0001.htm>


More information about the notifications mailing list