Skip to content

Commit e7709ec

Browse files
otac0nkartben
authored andcommitted
boards: st: Add I3G4250D gyroscope for stm32f411e_disco board
Add support for I3G4250D gyroscope that is present on D revisions of the stm32f411e_disco board. Signed-off-by: John Gietzen <[email protected]>
1 parent a5c33fd commit e7709ec

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

boards/st/stm32f411e_disco/doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ Default Zephyr Peripheral Mapping:
7777
- LD4 : PD12 (PWM4 CH1)
7878
- LD5 : PD14 (PWM4 CH3)
7979
- LD6 : PD15 (PWM4 CH4)
80+
- SPI1: PE3, PA5, PA6, PA7 (CS, SCK, MISO, MOSI)
8081

8182
System Clock
8283
============

boards/st/stm32f411e_disco/stm32f411e_disco.dts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
pwm-led3 = &blue_pwm_led;
8989
magn0 = &lsm303agr_magn;
9090
accel0 = &lsm303agr_accel;
91+
gyro0 = &i3g4250d;
9192
mcuboot-button0 = &user_button;
9293
mcuboot-led0 = &orange_led_3;
9394
die-temp0 = &die_temp;
@@ -158,6 +159,19 @@
158159
};
159160
};
160161

162+
&spi1 {
163+
pinctrl-0 = <&spi1_sck_pa5 &spi1_miso_pa6 &spi1_mosi_pa7>;
164+
pinctrl-names = "default";
165+
status = "okay";
166+
cs-gpios = <&gpioe 3 GPIO_ACTIVE_LOW>;
167+
168+
i3g4250d: i3g4250d@0 {
169+
compatible = "st,i3g4250d";
170+
reg = <0>;
171+
spi-max-frequency = <1000000>;
172+
};
173+
};
174+
161175
&usart2 {
162176
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
163177
pinctrl-names = "default";

boards/st/stm32f411e_disco/stm32f411e_disco_stm32f411xe_B.overlay

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
aliases {
99
/delete-property/ magn0;
1010
accel0 = &lsm303dlhc_accel;
11+
/delete-property/ gyro0;
1112
};
1213
};
1314

@@ -29,3 +30,8 @@
2930
<&gpioe 5 GPIO_ACTIVE_HIGH>;
3031
};
3132
};
33+
34+
/* The B revision has the l3gd20 instead of i3g4250d, but no test board is available. */
35+
&spi1 {
36+
/delete-node/ i3g4250d@0;
37+
};

0 commit comments

Comments
 (0)