mirror of
https://github.com/Dictor/RBF-PID-Balbot-firmware.git
synced 2026-08-17 08:41:50 +08:00
88 lines
2.0 KiB
Plaintext
88 lines
2.0 KiB
Plaintext
&i2c1 {
|
|
mpu9250@68 {
|
|
compatible = "invensense,mpu9250";
|
|
reg = <0x68>;
|
|
status = "okay";
|
|
irq-gpios = <&gpiob 1 GPIO_ACTIVE_HIGH>;
|
|
gyro-sr-div = <0>;
|
|
gyro-dlpf = <5>;
|
|
gyro-fs = <250>;
|
|
accel-fs = <2>;
|
|
accel-dlpf = "5.05";
|
|
};
|
|
};
|
|
|
|
&timers1 {
|
|
status = "okay";
|
|
|
|
pwm1: pwm {
|
|
status = "okay";
|
|
pinctrl-0 = <&tim1_ch3_pa10 &tim1_ch4_pa11>;
|
|
pinctrl-names = "default";
|
|
};
|
|
|
|
qdec {
|
|
compatible = "st,stm32-qdec";
|
|
status = "disabled";
|
|
pinctrl-0 = <&tim1_ch1_pa8 &tim1_ch2_pa9>;
|
|
pinctrl-names = "default";
|
|
st,counts-per-revolution = <1320>;
|
|
};
|
|
};
|
|
|
|
&timers2 {
|
|
status = "okay";
|
|
|
|
pwm2: pwm {
|
|
status = "okay";
|
|
pinctrl-0 = <&tim2_ch1_pa5 &tim2_ch2_pa1>;
|
|
pinctrl-names = "default";
|
|
};
|
|
};
|
|
|
|
/ {
|
|
buttons {
|
|
compatible = "gpio-keys";
|
|
m_fault: m_fault {
|
|
gpios = <&gpiob 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
|
|
label = "Motor fault signal";
|
|
};
|
|
};
|
|
|
|
leds {
|
|
compatible = "gpio-leds";
|
|
run_led: led_pd1 {
|
|
gpios = <&gpiob 3 GPIO_ACTIVE_HIGH>;
|
|
label = "Run LED";
|
|
};
|
|
err_led: led_pd0 {
|
|
gpios = <&gpiob 4 GPIO_ACTIVE_HIGH>;
|
|
label = "Error LED";
|
|
};
|
|
m_off: out_pa7 {
|
|
gpios = <&gpioa 7 GPIO_ACTIVE_LOW>;
|
|
label = "Motor off signal";
|
|
};
|
|
m_mode: out_pa6 {
|
|
gpios = <&gpioa 6 GPIO_ACTIVE_LOW>;
|
|
label = "Motor mode signal";
|
|
};
|
|
};
|
|
|
|
pwm-leds {
|
|
compatible = "pwm-leds";
|
|
status = "okay";
|
|
m_in1: pwm_pa10 {
|
|
pwms = <&pwm1 3 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
};
|
|
m_in2: pwm_pa11 {
|
|
pwms = <&pwm1 4 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
};
|
|
m_in3: pwm_pa5 {
|
|
pwms = <&pwm2 1 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
};
|
|
m_in4: pwm_pa1 {
|
|
pwms = <&pwm2 2 PWM_MSEC(1) PWM_POLARITY_NORMAL>;
|
|
};
|
|
};
|
|
}; |