Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Zephyr nrf52840_pca10056 SPI1 as Arduino SPI
diff --git a/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts b/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
index 1ca951ae58..950a1f935e 100644
--- a/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
+++ b/boards/arm/nrf52840_pca10056/nrf52840_pca10056.dts
@@ -176,12 +176,12 @@ arduino_i2c: &i2c0 {
miso-pin = <29>;
};
-&spi1 {
+arduino_spi: &spi1 {
compatible = "nordic,nrf-spi";
status = "okay";
- sck-pin = <31>;
- mosi-pin = <30>;
- miso-pin = <40>;
+ sck-pin = <47>;
+ miso-pin = <46>;
+ mosi-pin = <45>;
};
&spi2 {
@@ -207,11 +207,11 @@ arduino_i2c: &i2c0 {
};
};
-arduino_spi: &spi3 {
+&spi3 {
status = "okay";
- sck-pin = <47>;
- miso-pin = <46>;
- mosi-pin = <45>;
+ sck-pin = <31>;
+ mosi-pin = <30>;
+ miso-pin = <40>;
};
&flash0 {
@vanwinkeljan

This comment has been minimized.

Copy link
Owner Author

@vanwinkeljan vanwinkeljan commented Nov 22, 2019

The nrf52840 preview development kits used AAAA engineering version of the nrf52840 where SPI 3 is not working.
The patch in these gist remaps the arduino_spi to SPI 1.

@nwsetec

This comment has been minimized.

Copy link

@nwsetec nwsetec commented Nov 23, 2019

Thanks @vanwinkeljan!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment