Skip to content

Commit f2428c6

Browse files
ulrich-a11-ycfriedt
authored andcommitted
boards: st: nucleo_u385rg_q: change arduino_spi to spi1
According to user manual(UM3062, table 16), arduino_spi is connected to spi1 instead of spi3. Enable spi1 node and affect the SPI_NSS pin with I/O function to do the chip select. Remove i2c3 to avoid conflict with PA7 pin. Move the status property of dac1 node to maintain consistency in the ordering of node properties. NB: The SPI_NSS pin is not listed as an alternate function for SPI1 in the user manual (UM3062, Table 17). Signed-off-by: Ulrich KAMDEM <kamdemulricharmel@gmail.com>
1 parent 49c15bc commit f2428c6

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

boards/st/nucleo_u385rg_q/arduino_r3_connector.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@
3939

4040
arduino_i2c: &i2c1 {};
4141

42-
arduino_spi: &spi3 {};
42+
arduino_spi: &spi1 {};
4343

4444
arduino_serial: &lpuart1 {};

boards/st/nucleo_u385rg_q/nucleo_u385rg_q.dts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@
145145
};
146146

147147
&dac1 {
148-
status = "okay";
149148
pinctrl-0 = <&dac1_out1_pa4>;
150149
pinctrl-names = "default";
150+
status = "okay";
151151
};
152152

153153
&fdcan1 {
@@ -168,18 +168,25 @@
168168
status = "okay";
169169
};
170170

171-
&i2c3 {
172-
pinctrl-0 = <&i2c3_scl_pa7 &i2c3_sda_pc1>;
173-
pinctrl-names = "default";
174-
status = "okay";
175-
};
176-
177171
&rng {
178172
clocks = <&rcc STM32_CLOCK(AHB2, 18)>,
179173
<&rcc STM32_SRC_MSIK RNG_SEL(1)>;
180174
status = "okay";
181175
};
182176

177+
&spi1 {
178+
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6
179+
&spi1_mosi_pa7>;
180+
pinctrl-names = "default";
181+
182+
/* Arduino D10 (SPI_NSS) is wired to PC9 which
183+
* doesn't support hardware NSS; the software
184+
* cs-gpios must be used instead.
185+
*/
186+
cs-gpios = <&gpioc 9 GPIO_ACTIVE_LOW>;
187+
status = "okay";
188+
};
189+
183190
&spi3 {
184191
pinctrl-0 = <&spi3_nss_pa15 &spi3_sck_pb3
185192
&spi3_miso_pb4 &spi3_mosi_pb5>;

0 commit comments

Comments
 (0)