I'm testing the SPI-slave functionality based on the routine ncs/v3.3.0/zephyr/tests/drivers/spi/spi_controller_peripheral.
The original code uses the pins of SPIS21, but after I modified it to use the pins of SPIS00, SPIS00 fails to receive SPI data — the waveforms and hardware connections are normal.
Could you help check what the issue is? I've attached my modificatio3731.nrf54lm20dk_nrf54lm20a_cpuapp.overlayns.
diff --git a/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay b/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay
index b02a2be..2995c01 100644
--- a/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay
+++ b/boards/nrf54lm20dk_nrf54lm20a_cpuapp.overlay
@@ -5,10 +5,10 @@
*/
/* Test requires following loopbacks:
- * SCK: P1.23 - P1.24
- * MISO: P1.30 - P1.31
- * MOSI: P1.13 - P1.14
- * CS: P1.03 - P1.04
+ * SCK: P1.23 - P2.01
+ * MISO: P1.30 - P2.04
+ * MOSI: P1.13 - P2.02
+ * CS: P1.03 - P2.05
*/
&pinctrl {
@@ -29,21 +29,21 @@
};
};
- spi21_default_alt: spi21_default_alt {
+ spi00_default_alt: spi00_default_alt {
group1 {
- psels = <NRF_PSEL(SPIS_SCK, 1, 24)>,
- <NRF_PSEL(SPIS_MISO, 1, 31)>,
- <NRF_PSEL(SPIS_MOSI, 1, 14)>,
- <NRF_PSEL(SPIS_CSN, 1, 4)>;
+ psels = <NRF_PSEL(SPIS_SCK, 2, 1)>,
+ <NRF_PSEL(SPIS_MISO, 2, 4)>,
+ <NRF_PSEL(SPIS_MOSI, 2, 2)>,
+ <NRF_PSEL(SPIS_CSN, 2, 5)>;
};
};
- spi21_sleep_alt: spi21_sleep_alt {
+ spi00_sleep_alt: spi00_sleep_alt {
group1 {
- psels = <NRF_PSEL(SPIS_SCK, 1, 24)>,
- <NRF_PSEL(SPIS_MISO, 1, 31)>,
- <NRF_PSEL(SPIS_MOSI, 1, 14)>,
- <NRF_PSEL(SPIS_CSN, 1, 4)>;
+ psels = <NRF_PSEL(SPIS_SCK, 2, 1)>,
+ <NRF_PSEL(SPIS_MISO, 2, 4)>,
+ <NRF_PSEL(SPIS_MOSI, 2, 2)>,
+ <NRF_PSEL(SPIS_CSN, 2, 5)>;
low-power-enable;
};
};
@@ -53,6 +53,10 @@
status = "okay";
};
+&gpio2 {
+ status = "okay";
+};
+
&spi22 {
status = "okay";
pinctrl-0 = <&spi22_default_alt>;
@@ -69,13 +73,14 @@
};
};
-dut_spis: &spi21 {
+dut_spis: &spi00 {
compatible = "nordic,nrf-spis";
status = "okay";
def-char = <0x00>;
- pinctrl-0 = <&spi21_default_alt>;
- pinctrl-1 = <&spi21_sleep_alt>;
+ pinctrl-0 = <&spi00_default_alt>;
+ pinctrl-1 = <&spi00_sleep_alt>;
pinctrl-names = "default", "sleep";
/delete-property/ rx-delay-supported;
/delete-property/ rx-delay;
+ /delete-property/ cs-gpios;
};