diff --git a/boards/mro/ctrl-zero-classic/default.px4board b/boards/mro/ctrl-zero-classic/default.px4board index f88c94880fda..c16095b6a096 100644 --- a/boards/mro/ctrl-zero-classic/default.px4board +++ b/boards/mro/ctrl-zero-classic/default.px4board @@ -1,9 +1,11 @@ CONFIG_BOARD_TOOLCHAIN="arm-none-eabi" CONFIG_BOARD_ARCHITECTURE="cortex-m7" -CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS2" -CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS0" -CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS1" -CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS4" +CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS3" +CONFIG_BOARD_SERIAL_GPS2="/dev/ttyS4" +CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS1" +CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS2" +CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS5" +CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS0" CONFIG_DRIVERS_ADC_ADS1115=y CONFIG_DRIVERS_ADC_BOARD_ADC=y CONFIG_DRIVERS_BAROMETER_DPS310=y @@ -25,6 +27,7 @@ CONFIG_DRIVERS_PCA9685_PWM_OUT=y CONFIG_DRIVERS_POWER_MONITOR_INA226=y CONFIG_DRIVERS_PWM_OUT=y CONFIG_DRIVERS_RC_INPUT=y +CONFIG_DRIVERS_SAFETY_BUTTON=y CONFIG_DRIVERS_SMART_BATTERY_BATMON=y CONFIG_COMMON_TELEMETRY=y CONFIG_DRIVERS_TONE_ALARM=y @@ -96,4 +99,3 @@ CONFIG_SYSTEMCMDS_UORB=y CONFIG_SYSTEMCMDS_USB_CONNECTED=y CONFIG_SYSTEMCMDS_VER=y CONFIG_SYSTEMCMDS_WORK_QUEUE=y -CONFIG_EXAMPLES_FAKE_GPS=y diff --git a/boards/mro/ctrl-zero-classic/init/rc.board_defaults b/boards/mro/ctrl-zero-classic/init/rc.board_defaults index 32117f4a5886..110c240ee8a0 100644 --- a/boards/mro/ctrl-zero-classic/init/rc.board_defaults +++ b/boards/mro/ctrl-zero-classic/init/rc.board_defaults @@ -6,4 +6,4 @@ param set-default BAT1_V_DIV 10.1 param set-default BAT1_A_PER_V 17 -safety_button start +param set-default TEL_FRSKY_CONFIG 103 diff --git a/boards/mro/ctrl-zero-classic/init/rc.board_sensors b/boards/mro/ctrl-zero-classic/init/rc.board_sensors index 111e3eb0440b..46f488794516 100644 --- a/boards/mro/ctrl-zero-classic/init/rc.board_sensors +++ b/boards/mro/ctrl-zero-classic/init/rc.board_sensors @@ -16,3 +16,5 @@ icm20948 -s -b 1 -R 8 -M start # Interal DPS310 (barometer) dps310 -s -b 2 start + +safety_button start diff --git a/boards/mro/ctrl-zero-classic/nuttx-config/bootloader/defconfig b/boards/mro/ctrl-zero-classic/nuttx-config/bootloader/defconfig index 1167e3eefa79..1160920a4eb3 100644 --- a/boards/mro/ctrl-zero-classic/nuttx-config/bootloader/defconfig +++ b/boards/mro/ctrl-zero-classic/nuttx-config/bootloader/defconfig @@ -15,7 +15,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/mro/ctrl-zero-classic/nuttx-con CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32h7" -CONFIG_ARCH_CHIP_STM32H743II=y +CONFIG_ARCH_CHIP_STM32H743ZI=y CONFIG_ARCH_CHIP_STM32H7=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARMV7M_BASEPRI_WAR=y diff --git a/boards/mro/ctrl-zero-classic/nuttx-config/include/board.h b/boards/mro/ctrl-zero-classic/nuttx-config/include/board.h index d5ffa2c5848e..52206cccd00f 100644 --- a/boards/mro/ctrl-zero-classic/nuttx-config/include/board.h +++ b/boards/mro/ctrl-zero-classic/nuttx-config/include/board.h @@ -222,6 +222,9 @@ /* UART/USART */ +#define GPIO_USART1_TX GPIO_USART1_TX_3 /* PB6 */ +#define GPIO_USART1_RX GPIO_USART1_RX_3 /* PB7 */ + #define GPIO_USART2_TX GPIO_USART2_TX_2 /* PD5 */ #define GPIO_USART2_RX GPIO_USART2_RX_2 /* PD6 */ #define GPIO_USART2_CTS GPIO_USART2_CTS_NSS_2 /* PD3 */ @@ -235,9 +238,6 @@ #define GPIO_UART4_TX GPIO_UART4_TX_2 /* PA0 */ #define GPIO_UART4_RX GPIO_UART4_RX_2 /* PA1 */ -#define GPIO_USART6_TX 0 /* USART6 is RX-only */ -#define GPIO_USART6_RX GPIO_USART6_RX_1 /* PC7 */ - #define GPIO_UART7_TX GPIO_UART7_TX_3 /* PE8 */ #define GPIO_UART7_RX GPIO_UART7_RX_3 /* PE7 */ @@ -268,13 +268,14 @@ #define GPIO_SPI5_MISO GPIO_SPI5_MISO_1 /* PF8 */ #define GPIO_SPI5_MOSI GPIO_SPI5_MOSI_2 /* PF9 */ +#define GPIO_SPI6_SCK ADJ_SLEW_RATE(GPIO_SPI6_SCK_1) /* PG13 */ +#define GPIO_SPI6_MISO GPIO_SPI6_MISO_1 /* PG12 */ +#define GPIO_SPI6_MOSI GPIO_SPI6_MOSI_1 /* PG14 */ + /* I2C */ #define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 /* PB8 */ #define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 /* PB9 */ -#define GPIO_I2C3_SCL GPIO_I2C3_SCL_2 /* PH7 */ -#define GPIO_I2C3_SDA GPIO_I2C3_SDA_2 /* PH8 */ - -#define GPIO_I2C4_SCL GPIO_I2C4_SCL_4 /* PB6 */ -#define GPIO_I2C4_SDA GPIO_I2C4_SDA_4 /* PB7 */ +#define GPIO_I2C4_SCL GPIO_I2C4_SCL_2 /* PF14 */ +#define GPIO_I2C4_SDA GPIO_I2C4_SDA_2 /* PF15 */ diff --git a/boards/mro/ctrl-zero-classic/nuttx-config/nsh/defconfig b/boards/mro/ctrl-zero-classic/nuttx-config/nsh/defconfig index 0811c67f0af1..7e56401723d0 100644 --- a/boards/mro/ctrl-zero-classic/nuttx-config/nsh/defconfig +++ b/boards/mro/ctrl-zero-classic/nuttx-config/nsh/defconfig @@ -56,7 +56,7 @@ CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/mro/ctrl-zero-classic/nuttx-con CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y CONFIG_ARCH_BOARD_CUSTOM_NAME="px4" CONFIG_ARCH_CHIP="stm32h7" -CONFIG_ARCH_CHIP_STM32H743II=y +CONFIG_ARCH_CHIP_STM32H743ZI=y CONFIG_ARCH_CHIP_STM32H7=y CONFIG_ARCH_INTERRUPTSTACK=768 CONFIG_ARCH_STACKDUMP=y @@ -192,7 +192,6 @@ CONFIG_STM32H7_DMA2=y CONFIG_STM32H7_DMACAPABLE=y CONFIG_STM32H7_FLOWCONTROL_BROKEN=y CONFIG_STM32H7_I2C1=y -CONFIG_STM32H7_I2C3=y CONFIG_STM32H7_I2C4=y CONFIG_STM32H7_I2C_DYNTIMEO=y CONFIG_STM32H7_I2C_DYNTIMEO_STARTSTOP=10 @@ -212,17 +211,20 @@ CONFIG_STM32H7_SPI2=y CONFIG_STM32H7_SPI5=y CONFIG_STM32H7_SPI5_DMA=y CONFIG_STM32H7_SPI5_DMA_BUFFER=1024 +CONFIG_STM32H7_SPI6=y +CONFIG_STM32H7_TIM15=y +CONFIG_STM32H7_TIM16=y CONFIG_STM32H7_TIM1=y CONFIG_STM32H7_TIM2=y CONFIG_STM32H7_TIM3=y CONFIG_STM32H7_TIM4=y CONFIG_STM32H7_TIM8=y +CONFIG_STM32H7_USART1=y +CONFIG_STM32H7_USART2=y +CONFIG_STM32H7_USART3=y CONFIG_STM32H7_UART4=y CONFIG_STM32H7_UART7=y CONFIG_STM32H7_UART8=y -CONFIG_STM32H7_USART2=y -CONFIG_STM32H7_USART3=y -CONFIG_STM32H7_USART6=y CONFIG_STM32H7_USART_BREAKS=y CONFIG_STM32H7_USART_INVERT=y CONFIG_STM32H7_USART_SINGLEWIRE=y @@ -252,9 +254,6 @@ CONFIG_USART3_IFLOWCONTROL=y CONFIG_USART3_OFLOWCONTROL=y CONFIG_USART3_RXBUFSIZE=600 CONFIG_USART3_TXBUFSIZE=3000 -CONFIG_USART6_BAUD=57600 -CONFIG_USART6_RXBUFSIZE=600 -CONFIG_USART6_TXBUFSIZE=1500 CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 diff --git a/boards/mro/ctrl-zero-classic/src/board_config.h b/boards/mro/ctrl-zero-classic/src/board_config.h index dfb0dfcb1a78..d40eb1e56ffc 100644 --- a/boards/mro/ctrl-zero-classic/src/board_config.h +++ b/boards/mro/ctrl-zero-classic/src/board_config.h @@ -45,95 +45,111 @@ #include /* LEDs are driven with push open drain to support Anode to 5V or 3.3V */ -#define GPIO_nLED_RED /* PB11 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN11) -#define GPIO_nLED_GREEN /* PB1 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN1) +#define GPIO_nLED_RED /* PB4 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN4) +#define GPIO_nLED_GREEN /* PB5 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN5) #define GPIO_nLED_BLUE /* PB3 */ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN3) +#define GPIO_LED_SAFETY /* PE6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN6) + #define BOARD_HAS_CONTROL_STATUS_LEDS 1 #define BOARD_OVERLOAD_LED LED_RED #define BOARD_ARMED_STATE_LED LED_BLUE /* ADC channels */ #define PX4_ADC_GPIO \ - /* PA2 */ GPIO_ADC12_INP14, \ + /* PC4 */ GPIO_ADC12_INP4, \ /* PA3 */ GPIO_ADC12_INP15, \ /* PA4 */ GPIO_ADC12_INP18, \ - /* PC1 */ GPIO_ADC123_INP11 + /* PC0 */ GPIO_ADC123_INP10, \ + /* PC5 */ GPIO_ADC12_INP8, \ + /* PB0 */ GPIO_ADC12_INP9, \ + /* PB1 */ GPIO_ADC12_INP5 /* Define Channel numbers must match above GPIO pins */ -#define ADC_BATTERY_VOLTAGE_CHANNEL 14 /* PA2 BATT_VOLT_SENS */ +#define ADC_BATTERY_VOLTAGE_CHANNEL 4 /* PC4 BATT_VOLT_SENS */ #define ADC_BATTERY_CURRENT_CHANNEL 15 /* PA3 BATT_CURRENT_SENS */ #define ADC_SCALED_V5_CHANNEL 18 /* PA4 VDD_5V_SENS */ -#define ADC_RC_RSSI_CHANNEL 11 /* PC1 */ +#define ADC_RC_RSSI_CHANNEL 10 /* PC0 */ +#define ADC_AIRSPEED_VOLTAGE_CHANNEL 8 /* PC5 */ +#define ADC_AUX1_VOLTAGE_CHANNEL 9 /* PB0 */ +#define ADC_AUX2_VOLTAGE_CHANNEL 5 /* PB1 */ #define ADC_CHANNELS \ ((1 << ADC_BATTERY_VOLTAGE_CHANNEL) | \ (1 << ADC_BATTERY_CURRENT_CHANNEL) | \ (1 << ADC_SCALED_V5_CHANNEL) | \ - (1 << ADC_RC_RSSI_CHANNEL)) + (1 << ADC_RC_RSSI_CHANNEL) | \ + (1 << ADC_AIRSPEED_VOLTAGE_CHANNEL) | \ + (1 << ADC_AUX1_VOLTAGE_CHANNEL) | \ + (1 << ADC_AUX2_VOLTAGE_CHANNEL)) /* HW has to large of R termination on ADC todo:change when HW value is chosen */ #define BOARD_ADC_OPEN_CIRCUIT_V (5.6f) /* CAN Silence: Silent mode control */ -#define GPIO_CAN1_SILENT_S0 /* PF5 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN5) -#define GPIO_CAN2_SILENT_S0 /* PF5 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN5) +#define GPIO_CAN1_SILENT_S0 /* PF11 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN11) +#define GPIO_CAN2_SILENT_S0 /* PF12 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN12) /* PWM */ #define DIRECT_PWM_OUTPUT_CHANNELS 12 /* Power supply control and monitoring GPIOs */ -#define GPIO_nPOWER_IN_A /* PB5 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN5) +#define GPIO_nPOWER_IN_A /* PC1 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1) #define GPIO_VDD_BRICK1_VALID GPIO_nPOWER_IN_A /* Brick 1 Is Chosen */ #define BOARD_NUMBER_BRICKS 1 #define GPIO_VDD_3V3_SPEKTRUM_POWER_EN /* PE4 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTE|GPIO_PIN4) +#define GPIO_LEVEL_SHIFTER_OE /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13) + /* Define True logic Power Control in arch agnostic form */ #define VDD_3V3_SPEKTRUM_POWER_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SPEKTRUM_POWER_EN, (!on_true)) #define READ_VDD_3V3_SPEKTRUM_POWER_EN() (px4_arch_gpioread(GPIO_VDD_3V3_SPEKTRUM_POWER_EN) == 0) /* Tone alarm output */ -#define TONE_ALARM_TIMER 2 /* timer 2 */ -#define TONE_ALARM_CHANNEL 1 /* PA15 TIM2_CH1 */ +#define TONE_ALARM_TIMER 16 /* timer 16 */ +#define TONE_ALARM_CHANNEL 1 /* PF6 TIM16_CH1 */ -#define GPIO_BUZZER_1 /* PA15 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN15) +#define GPIO_BUZZER_1 /* PF6 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTF|GPIO_PIN6) #define GPIO_TONE_ALARM_IDLE GPIO_BUZZER_1 -#define GPIO_TONE_ALARM GPIO_TIM2_CH1OUT_2 +#define GPIO_TONE_ALARM GPIO_TIM16_CH1OUT_2 /* USB OTG FS */ #define GPIO_OTGFS_VBUS /* PA9 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_100MHz|GPIO_PORTA|GPIO_PIN9) /* High-resolution timer */ #define HRT_TIMER 3 /* use timer3 for the HRT */ -#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel 1 */ +#define HRT_TIMER_CHANNEL 2 /* use capture/compare channel 1 */ -#define HRT_PPM_CHANNEL /* T3C3 */ 3 /* use capture/compare channel 3 */ -#define GPIO_PPM_IN /* PB0 T3C3 */ GPIO_TIM3_CH3IN_1 +#define HRT_PPM_CHANNEL /* T3C2 */ 2 /* use capture/compare channel 2 */ +#define GPIO_PPM_IN /* PC7 T3C2 */ GPIO_TIM3_CH2IN_3 /* RC Serial port */ -#define RC_SERIAL_PORT "/dev/ttyS3" +#define RC_SERIAL_PORT "/dev/ttyS5" -#define GPIO_RSSI_IN /* PC1 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1) +#define GPIO_RSSI_IN /* PC0 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN0) /* Safety Switch: Enable the FMU to control it if there is no px4io fixme:This should be BOARD_SAFETY_LED(__ontrue) */ -#define GPIO_SAFETY_SWITCH_IN /* PC4 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN4) -/* Enable the FMU to use the switch it if there is no px4io fixme:This should be BOARD_SAFTY_BUTTON() */ +#define GPIO_SAFETY_SWITCH_IN /* PA10 */ (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTA|GPIO_PIN10) +/* Enable the FMU to use the switch it if there is no px4io fixme:This should be BOARD_SAFETY_BUTTON() */ #define GPIO_BTN_SAFETY GPIO_SAFETY_SWITCH_IN /* Enable the FMU to control it if there is no px4io */ +/* No PX4IO processor present */ +#define PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO 0 + /* Power switch controls ******************************************************/ #define SPEKTRUM_POWER(_on_true) VDD_3V3_SPEKTRUM_POWER_EN(_on_true) /* * Board has a separate RC_IN * - * GPIO PPM_IN on PB0 T3CH3 + * GPIO PPM_IN on PC7 T3CH2 * SPEKTRUM_RX (it's TX or RX in Bind) on UART6 PC7 * Inversion is possible in the UART and can drive GPIO_PPM_IN as an output */ -#define GPIO_PPM_IN_AS_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN0) +#define GPIO_PPM_IN_AS_OUT (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN7) #define SPEKTRUM_RX_AS_GPIO_OUTPUT() px4_arch_configgpio(GPIO_PPM_IN_AS_OUT) #define SPEKTRUM_RX_AS_UART() /* Can be left as uart */ #define SPEKTRUM_OUT(_one_true) px4_arch_gpiowrite(GPIO_PPM_IN_AS_OUT, (_one_true)) @@ -156,7 +172,7 @@ #define BOARD_HAS_STATIC_MANIFEST 1 -#define BOARD_NUM_IO_TIMERS 5 +#define BOARD_NUM_IO_TIMERS 6 #define BOARD_ENABLE_CONSOLE_BUFFER @@ -171,9 +187,12 @@ GPIO_CAN2_SILENT_S0, \ GPIO_nPOWER_IN_A, \ GPIO_VDD_3V3_SPEKTRUM_POWER_EN, \ + GPIO_LEVEL_SHIFTER_OE, \ GPIO_TONE_ALARM_IDLE, \ GPIO_SAFETY_SWITCH_IN, \ GPIO_OTGFS_VBUS, \ + GPIO_BTN_SAFETY, \ + GPIO_LED_SAFETY, \ } __BEGIN_DECLS diff --git a/boards/mro/ctrl-zero-classic/src/i2c.cpp b/boards/mro/ctrl-zero-classic/src/i2c.cpp index 1b8927c69939..49c9ea1c7efd 100644 --- a/boards/mro/ctrl-zero-classic/src/i2c.cpp +++ b/boards/mro/ctrl-zero-classic/src/i2c.cpp @@ -35,6 +35,5 @@ constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = { initI2CBusExternal(1), - initI2CBusExternal(3), initI2CBusExternal(4), }; diff --git a/boards/mro/ctrl-zero-classic/src/spi.cpp b/boards/mro/ctrl-zero-classic/src/spi.cpp index 4a4c3502bbd9..674ae3f09b2f 100644 --- a/boards/mro/ctrl-zero-classic/src/spi.cpp +++ b/boards/mro/ctrl-zero-classic/src/spi.cpp @@ -37,7 +37,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = { initSPIBus(SPI::Bus::SPI1, { - initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortC, GPIO::Pin2}, SPI::DRDY{GPIO::PortD, GPIO::Pin15}), + initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortG, GPIO::Pin3}, SPI::DRDY{GPIO::PortG, GPIO::Pin2}), initSPIDevice(DRV_IMU_DEVTYPE_ICM20948, SPI::CS{GPIO::PortE, GPIO::Pin15}, SPI::DRDY{GPIO::PortE, GPIO::Pin12}), }, {GPIO::PortE, GPIO::Pin3}), initSPIBus(SPI::Bus::SPI2, { @@ -46,7 +46,10 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = { }), initSPIBus(SPI::Bus::SPI5, { initSPIDevice(DRV_GYR_DEVTYPE_BMI088, SPI::CS{GPIO::PortF, GPIO::Pin10}, SPI::DRDY{GPIO::PortF, GPIO::Pin3}), - initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortF, GPIO::Pin6}, SPI::DRDY{GPIO::PortF, GPIO::Pin1}), + initSPIDevice(DRV_ACC_DEVTYPE_BMI088, SPI::CS{GPIO::PortF, GPIO::Pin0}, SPI::DRDY{GPIO::PortF, GPIO::Pin1}), + }), + initSPIBusExternal(SPI::Bus::SPI6, { + initSPIConfigExternal(SPI::CS{GPIO::PortG, GPIO::Pin9}), }), }; diff --git a/boards/mro/ctrl-zero-classic/src/timer_config.cpp b/boards/mro/ctrl-zero-classic/src/timer_config.cpp index 23bb7a1decc7..50760e387bba 100644 --- a/boards/mro/ctrl-zero-classic/src/timer_config.cpp +++ b/boards/mro/ctrl-zero-classic/src/timer_config.cpp @@ -33,6 +33,28 @@ #include +/* Timer allocation + * + * TIM1_CH4 T FMU_CH1 + * TIM1_CH3 T FMU_CH2 + * TIM1_CH2 T FMU_CH3 + * TIM1_CH1 T FMU_CH4 + * + * TIM4_CH2 T FMU_CH5 + * TIM4_CH3 T FMU_CH6 + * TIM2_CH3 T FMU_CH7 + * TIM2_CH1 T FMU_CH8 + * + * TIM2_CH4 T FMU_CH9 + * TIM15_CH1 T FMU_CH10 + * + * TIM8_CH1 T FMU_CH11 + * + * TIM4_CH4 T FMU_CH12 + * + * TIM16_CH1 T BUZZER - Driven by other driver + */ + constexpr io_timers_t io_timers[MAX_IO_TIMERS] = { initIOTimer(Timer::Timer1, DMA{DMA::Index1}), initIOTimer(Timer::Timer4, DMA{DMA::Index1}),