diff --git a/boards/kakute-f7-mini-v3/src/board.rs b/boards/kakute-f7-mini-v3/src/board.rs new file mode 100644 index 0000000..0d7b47e --- /dev/null +++ b/boards/kakute-f7-mini-v3/src/board.rs @@ -0,0 +1,34 @@ +//! Kakute F7 Mini V3 static hardware selections. + +use kaptan_drivers::mpu6000::{ + AccelerometerRange, DigitalLowPassFilter, GyroscopeRange, Mpu6000Config, +}; +use kaptan_stm32f7::stm32f722::Tim2PeriodicConfig; + +/// Core frequency in whole megahertz after selecting the HSI16 board profile. +pub const CORE_CLOCK_MHZ: u32 = 16; +/// APB2 frequency driving USART1 in the HSI16 board profile. +pub const USART1_CLOCK_HZ: u32 = 16_000_000; +/// Telemetry UART wire rate. +pub const USART1_BAUD: u32 = 115_200; +/// MAVLink sender system identifier. +pub const MAVLINK_SYSTEM_ID: u8 = 1; +/// MAVLink sender component identifier. +pub const MAVLINK_COMPONENT_ID: u8 = 1; + +/// MPU6000 full-scale profile used by this board. +pub const MPU6000_CONFIG: Mpu6000Config = Mpu6000Config { + accelerometer: AccelerometerRange::PlusMinus4G, + gyroscope: GyroscopeRange::PlusMinus500DegreesPerSecond, + digital_low_pass_filter: DigitalLowPassFilter::Bandwidth42Hz, + sample_rate_divider: 9, +}; + +/// Ten-hertz TIM2 update from the 16 MHz HSI16 board profile. +/// +/// The runtime emits its one-hertz heartbeat every tenth tick and uses the +/// intermediate ticks for the MPU6000 reset-settling interval and DWT epoch. +pub const HEARTBEAT_TIMER_CONFIG: Tim2PeriodicConfig = Tim2PeriodicConfig { + prescaler: 15_999, + auto_reload: 99, +};