Skip to content

Commit

Permalink
PowerStack: AP_Perif compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
lthall committed Jan 27, 2024
1 parent 6db1dc5 commit 699250a
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions libraries/AP_HAL_ChibiOS/hwdef/FSOPowerStack/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,20 @@ define CH_CFG_ST_FREQUENCY 1000000
# assume 512k flash part
FLASH_SIZE_KB 512

# debug on USART2
STDOUT_SERIAL SD2
STDOUT_BAUDRATE 57600

# order of UARTs
SERIAL_ORDER USART2
SERIAL_ORDER UART4 UART5

# LEDs
PA10 LED OUTPUT HIGH # blue
# UARTs

# UART4, External Serial Port
PC10 UART4_TX UART4
Pc11 UART4_RX UART4
PB7 UART4_CTS UART4
PA15 UART4_RTS UART4

# USART2, debug
PA14 USART2_TX USART2
PA15 USART2_RX USART2
# UART5, External Serial Port
PC12 UART5_TX UART5
PD2 UART5_RX UART5

# SWD debugging
PA13 JTMS-SWDIO SWD
Expand Down Expand Up @@ -69,18 +70,18 @@ define AP_TEMPERATURE_SENSOR_ENABLED 1

# I2C2 is Power Distribution Board
PA8 I2C2_SDA I2C2
PC9 I2C2_SCL I2C2
PA9 I2C2_SCL I2C2

# I2C3 is Auxiliary Power Board
PC8 I2C3_SCL I2C3
PC9 I2C3_SDA I2C3

# I2C4 is External I2C Port
PC6 I2C4_SCL I2C4
PC7 I2C4_SDA I2C4
# PC6 I2C4_SCL I2C4
# PC7 I2C4_SDA I2C4

# order of I2C buses
I2C_ORDER I2C2 I2C3 I2C4
I2C_ORDER I2C2 I2C3 # I2C4

# BATTERY
define HAL_PERIPH_ENABLE_BATTERY
Expand All @@ -97,26 +98,26 @@ PC2 BATT_VOLTAGE_SENS ADC1 SCALE(1) # ADC Bat 1 Voltage
PC3 BATT2_VOLTAGE_SENS ADC1 SCALE(1) # ADC Bat 2 Voltage
# VBat channel should be here somewhere too

PA6 TIM3_CH3 TIM3 GPIO(50) # Input Fan1 Tach
PA6 TIM3_CH1 TIM3 GPIO(50) # Input Fan1 Tach
PA7 TIM3_CH2 TIM3 GPIO(51) # Input Fan2 Tach
PB0 TIM3_CH3 TIM3 GPIO(52) # Input Fan3 Tach
PB1 TIM3_CH4 TIM3 GPIO(53) # Input Fan4 Tach
PB10 GPIO(54) # Output Payload Pre-charge
PB11 GPIO(55) # Output Payload FET
PB12 GPIO(56) # Input Main Power On/Off
PB14 GPIO(57) # Input Payload Power On/Off
PC4 GPIO(58) # Payload 1 Enable
PC5 GPIO(59) # Payload 2 Enable
PC13 GPIO(60) # Output Main Pre Charge
PC14 GPIO(61) # Output Bat 1 FET
PC15 GPIO(62) # Output Bat 2 FET
# PB10 TIM2_CH3 TIM2 PWM(1) GPIO(54) # Output Payload Pre-charge
# PB11 TIM2_CH4 TIM2 PWM(2) GPIO(55) # Output Payload FET
# PB12 GPIO(56) # Input Main Power On/Off
PB14 TIM15_CH1 TIM15 GPIO(57) # Input Payload Power On/Off
# PC4 GPIO(58) # Payload 1 Enable
PC5 TIM1_CH4N TIM1 GPIO(59) # Payload 2 Enable
PC13 TIM1_CH1N TIM1 GPIO(60) # Output Main Pre Charge
# PC14 GPIO(61) # Output Bat 1 FET
# PC15 GPIO(62) # Output Bat 2 FET


# LEDs
PA1 LED_RED OUTPUT OPENDRAIN GPIO(90) HIGH
PA2 LED_GREEN OUTPUT OPENDRAIN GPIO(91) HIGH
PA3 LED_BLUE OUTPUT OPENDRAIN GPIO(92) HIGH
PA10 TIM1_CH4 TIM1 PWM(1) GPIO(63) # Ouput Status RGB LED
PA10 TIM1_CH3 TIM1 PWM(3) GPIO(63) # Ouput Status RGB LED
PB2 LED_BOOT OUTPUT GPIO(64) # Led Bootloader
PB13 LED_MAIN OUTPUT GPIO(65) # Output Main LED
PB15 LED_PAYLOAD OUTPUT GPIO(66) # Output Payload LED
Expand Down

0 comments on commit 699250a

Please sign in to comment.