Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SP Racing H7 extreme updates #20385

Merged
merged 2 commits into from
Mar 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Tools/bootloaders/SPRacingH7_bl.bin
Binary file not shown.
2,391 changes: 1,195 additions & 1,196 deletions Tools/bootloaders/SPRacingH7_bl.hex

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion libraries/AP_HAL_ChibiOS/QSPIDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "Util.h"
#include "Scheduler.h"
#include <stdio.h>
#include "hwdef/common/stm32_util.h"

#if HAL_USE_WSPI == TRUE && defined(HAL_QSPI_DEVICE_LIST)

Expand Down
1 change: 1 addition & 0 deletions libraries/AP_HAL_ChibiOS/QSPIDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#if !defined(HAL_BOOTLOADER_BUILD)
#include "Semaphores.h"
#endif
#include "hwdef/common/stm32_util.h"

#include "Scheduler.h"
#include "Device.h"
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7/defaults.parm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ NTF_LED_TYPES 257
# setup SERIAL2 for RCIN
SERIAL2_BAUD 115
SERIAL2_OPTIONS 8

# currently using both IMUs is too CPU intensive
INS_ENABLE_MASK 1
5 changes: 4 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7/hwdef-bl.dat
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PA12 OTG_FS_DP OTG1
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD

PE3 LED_BOOTLOADER OUTPUT LOW # Blue LED
PE3 LED_BOOTLOADER OUTPUT LOW # Red LED
define HAL_LED_ON 0

# QuadSPI Flash
Expand All @@ -57,3 +57,6 @@ DEFAULTGPIO OUTPUT LOW PULLDOWN
PB12 ICM20602_2_CS CS
PA15 ICM20602_1_CS CS
PE11 AT7456E_CS CS

## pull up VTX power
PB01 VTX_PWR OUTPUT HIGH GPIO(81)
23 changes: 15 additions & 8 deletions libraries/AP_HAL_ChibiOS/hwdef/SPRacingH7/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,33 @@ PE14 SPI4_MOSI SPI4
PB8 I2C1_SCL I2C1 PULLUP
PB9 I2C1_SDA I2C1 PULLUP

# Internal current sensor
PC1 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PC0 BATT_CURRENT_SENS ADC1 SCALE(1)
# External current sensor
PC5 BATT_CURRENT_SENS2 ADC1 SCALE(1) # analog pin 8

# VTX Power control - should be high at startup to ensure power
PB01 VTX_PWR OUTPUT HIGH GPIO(81)
define RELAY2_PIN_DEFAULT 81

PC4 RSSI_IN ADC1
define BOARD_RSSI_ANA_PIN 0

# define default battery setup
define HAL_BATT_VOLT_PIN 13
define HAL_BATT_CURR_PIN 12
define HAL_BATT_VOLT_PIN 11
define HAL_BATT_CURR_PIN 10
define HAL_BATT_VOLT_SCALE 10.9
define HAL_BATT_CURR_SCALE 28.5
define HAL_BATT_MONITOR_DEFAULT 4

PC5 RSSI_ADC ADC1

# USART1
# USART1 (RCIN)
PB15 USART1_RX USART1
PB14 USART1_TX USART1
define HAL_SERIAL1_PROTOCOL SerialProtocol_RCIN

# USART2 (RCIN)
# USART2 (SmartPort)
PD5 USART2_TX USART2
define HAL_SERIAL2_PROTOCOL SerialProtocol_RCIN

# USART3
PD9 USART3_RX USART3
Expand Down Expand Up @@ -150,7 +155,8 @@ PD15 TIM4_CH4 TIM4 PWM(10) GPIO(59) # M10

# NeoPixel LED strip
PA8 TIM1_CH1 TIM1 PWM(11) GPIO(60)
PE3 LED0 OUTPUT LOW GPIO(90) # Blue LED
# Red LED
PE3 LED0 OUTPUT LOW GPIO(90)

# spi devices
SPIDEV icm20602_1 SPI3 DEVID1 ICM20602_1_CS MODE3 2*MHZ 10*MHZ
Expand All @@ -162,6 +168,7 @@ DMA_PRIORITY SPI3* SPI2* TIM5*
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define ALLOW_ARM_NO_COMPASS
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
define HAL_I2C_INTERNAL_MASK 0

# two IMUs
IMU Invensense SPI:icm20602_1 ROTATION_YAW_90
Expand Down