[riot-notifications] [RIOT-OS/RIOT] tests/driver_sx127x problem (#11838)

Francisco notifications at github.com
Wed Jul 17 15:55:52 CEST 2019


@isavitsky I found the issue, the problem comes from the fact that the default pin configuration for the `sx127x` driver is for nucleo-64 boards, for nucleo-32 board like the `nucleo-l432kc` the pinout between the Dx and Ax is not the same.

You can apply this diff so the arduino pin mapping match nucleo-32 boards (it worked for me using a `nucleo-l432kc` and a `SX1272MB2xAS`):

```
diff --git a/drivers/sx127x/include/sx127x_params.h b/drivers/sx127x/include/sx127x_params.h
index 661c37e80..7a5074bf7 100644
--- a/drivers/sx127x/include/sx127x_params.h
+++ b/drivers/sx127x/include/sx127x_params.h
@@ -37,27 +37,27 @@ extern "C" {
 #endif
 
 #ifndef SX127X_PARAM_SPI_NSS
-#define SX127X_PARAM_SPI_NSS                GPIO_PIN(1, 6)       /* D10 */
+#define SX127X_PARAM_SPI_NSS                GPIO_PIN(PORT_A, 11)       /* D10 */
 #endif
 
 #ifndef SX127X_PARAM_RESET
-#define SX127X_PARAM_RESET                  GPIO_PIN(0, 0)       /* A0 */
+#define SX127X_PARAM_RESET                  GPIO_PIN(PORT_A, 0)       /* A0 */
 #endif
 
 #ifndef SX127X_PARAM_DIO0
-#define SX127X_PARAM_DIO0                   GPIO_PIN(0, 10)      /* D2 */
+#define SX127X_PARAM_DIO0                   GPIO_PIN(PORT_A, 12)      /* D2 */
 #endif
 
 #ifndef SX127X_PARAM_DIO1
-#define SX127X_PARAM_DIO1                   GPIO_PIN(1, 3)       /* D3 */
+#define SX127X_PARAM_DIO1                   GPIO_PIN(PORT_B, 0)       /* D3 */
 #endif
 
 #ifndef SX127X_PARAM_DIO2
-#define SX127X_PARAM_DIO2                   GPIO_PIN(1, 5)       /* D4 */
+#define SX127X_PARAM_DIO2                   GPIO_PIN(PORT_B, 7)       /* D4 */
 #endif
 
 #ifndef SX127X_PARAM_DIO3
-#define SX127X_PARAM_DIO3                   GPIO_PIN(1, 4)       /* D5 */
+#define SX127X_PARAM_DIO3                   GPIO_PIN(PORT_B, 6)       /* D5 */
 #endif
 
 #ifndef SX127X_PARAM_PASELECT

```

![image](https://user-images.githubusercontent.com/23060007/61381261-1499ab80-a8ab-11e9-9562-f7f275f60ec7.png)

Let me know if that works for you.

-- 
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/issues/11838#issuecomment-512265247
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190717/8909f69c/attachment.html>


More information about the notifications mailing list