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

hwdef: new board CSKY-PMU #28686

Closed
wants to merge 147 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6505b56
Create hwdef.dat
jstc4ll Jun 17, 2024
a3efb95
Update hwdef.dat
jstc4ll Jun 17, 2024
4f7b650
Update hwdef.dat
jstc4ll Jun 17, 2024
ccc1b93
Create hwdef.inc
jstc4ll Jun 17, 2024
ac4b7b9
Update hwdef.inc
jstc4ll Jun 17, 2024
dbf5dcb
Update hwdef.inc
jstc4ll Jun 17, 2024
e70558f
Delete libraries/AP_HAL_ChibiOS/hwdef/Inferno-PMU/hwdef.dat
jstc4ll Jun 17, 2024
5d10122
Rename hwdef.inc to hwdef.dat
jstc4ll Jun 17, 2024
8679217
Update hwdef.dat
jstc4ll Jun 17, 2024
43fda6b
Update hwdef.dat
jstc4ll Jun 17, 2024
1ab895a
Update hwdef.dat
jstc4ll Jun 17, 2024
efdd5f4
Update hwdef.dat
jstc4ll Jun 17, 2024
a6c4b42
Create hwdef-bl.dat
jstc4ll Jun 18, 2024
003bda9
Update hwdef-bl.dat
jstc4ll Jun 18, 2024
d127219
Update hwdef.dat
jstc4ll Jun 18, 2024
fb53f33
Update hwdef-bl.dat
jstc4ll Jun 18, 2024
6da6169
Update hwdef.dat
jstc4ll Jun 18, 2024
5a84398
Update hwdef.dat
jstc4ll Jun 18, 2024
8f5e8bc
Update hwdef-bl.dat
jstc4ll Jun 18, 2024
c25e890
Update hwdef.dat
jstc4ll Jun 18, 2024
8623504
Update hwdef.dat
jstc4ll Jun 18, 2024
cdbd38d
Update hwdef.dat
jstc4ll Jun 18, 2024
9b8c8ec
Update hwdef.dat
jstc4ll Jun 18, 2024
f2f911a
Update hwdef.dat
jstc4ll Jun 18, 2024
fe4eee3
Update hwdef.dat
jstc4ll Jun 18, 2024
ea81d1b
Update hwdef.dat
jstc4ll Jun 18, 2024
0e9a5d8
Update hwdef.dat
jstc4ll Jun 18, 2024
72aeb66
Update hwdef.dat
jstc4ll Jun 19, 2024
5c32a67
Update hwdef.dat
jstc4ll Jun 19, 2024
7cd000e
Update hwdef.dat
jstc4ll Jun 19, 2024
ed7f77f
Update hwdef.dat
jstc4ll Jun 19, 2024
683df22
Update hwdef.dat
jstc4ll Jun 19, 2024
432dec3
Update hwdef.dat
jstc4ll Jun 19, 2024
8ede96f
Update hwdef.dat
jstc4ll Jun 19, 2024
aa07224
Update hwdef.dat
jstc4ll Jun 19, 2024
84035a8
Update hwdef.dat
jstc4ll Jun 19, 2024
e40759b
Update hwdef.dat
jstc4ll Jun 19, 2024
4147d66
Update hwdef.dat
jstc4ll Jun 19, 2024
0554879
Update hwdef.dat
jstc4ll Jun 19, 2024
1212b8f
Update hwdef.dat
jstc4ll Jun 19, 2024
81ecb18
Update hwdef.dat
jstc4ll Jun 19, 2024
2d817c4
Update hwdef.dat
jstc4ll Jun 19, 2024
f3b2d59
Update hwdef.dat
jstc4ll Jun 19, 2024
9a420e7
Update hwdef.dat
jstc4ll Jun 19, 2024
1cec427
Update hwdef.dat
jstc4ll Jun 19, 2024
b92bb64
Update hwdef.dat
jstc4ll Jun 19, 2024
8ccca89
Update hwdef.dat
jstc4ll Jun 19, 2024
4fdb9c2
Update hwdef.dat
jstc4ll Jun 19, 2024
2fc34a8
Update hwdef.dat
jstc4ll Jun 19, 2024
8cbd68a
Update hwdef.dat
jstc4ll Jun 19, 2024
b69f40d
Update hwdef.dat
jstc4ll Jun 19, 2024
d3430ee
Update hwdef.dat
jstc4ll Jun 19, 2024
3c67874
Update hwdef.dat
jstc4ll Jun 19, 2024
61fcf54
Update hwdef.dat
jstc4ll Jun 19, 2024
f924312
Update hwdef.dat
jstc4ll Jun 20, 2024
a901ad3
Update hwdef.dat
jstc4ll Jun 20, 2024
384676e
Update hwdef.dat
jstc4ll Jun 20, 2024
ee5d9f8
Update hwdef.dat
jstc4ll Jun 20, 2024
3641441
Update hwdef.dat
jstc4ll Jun 20, 2024
d4f3d8a
Update hwdef.dat
jstc4ll Jun 20, 2024
6d0d764
Update hwdef.dat
jstc4ll Jun 20, 2024
4562789
Update hwdef.dat
jstc4ll Jun 20, 2024
9d93a68
Update hwdef.dat
jstc4ll Jun 20, 2024
c698756
Update hwdef.dat
jstc4ll Jun 20, 2024
07984f1
Update hwdef.dat
jstc4ll Jun 20, 2024
9ad6908
Update hwdef.dat
jstc4ll Jun 20, 2024
3b70641
Update hwdef.dat
jstc4ll Jun 20, 2024
dc84d56
Update hwdef.dat
jstc4ll Jun 20, 2024
82755fc
Update hwdef.dat
jstc4ll Jun 20, 2024
dcab8da
Update hwdef.dat
jstc4ll Jun 20, 2024
879d5a6
Update hwdef.dat
jstc4ll Jun 20, 2024
8cbb25f
Update hwdef.dat
jstc4ll Jun 20, 2024
0859c6c
Update hwdef.dat
jstc4ll Jun 20, 2024
295b073
Update hwdef.dat
jstc4ll Jun 20, 2024
465a7ca
Update hwdef.dat
jstc4ll Jun 20, 2024
cfa40c3
Update hwdef.dat
jstc4ll Jun 20, 2024
a93f446
Update hwdef.dat
jstc4ll Jun 20, 2024
2028de6
Update hwdef.dat
jstc4ll Jun 20, 2024
020eac4
Update hwdef-bl.dat
jstc4ll Jun 20, 2024
85970d3
Update hwdef-bl.dat
jstc4ll Jun 20, 2024
36ef68a
Update hwdef-bl.dat
jstc4ll Jun 20, 2024
8e40db6
Update hwdef-bl.dat
jstc4ll Jun 20, 2024
eed603d
Update hwdef.dat
jstc4ll Jun 21, 2024
de3ec5b
Update hwdef.dat
jstc4ll Jun 21, 2024
1920098
Update hwdef.dat
jstc4ll Jun 21, 2024
223421a
Update hwdef.dat
jstc4ll Jun 21, 2024
a6c3a28
Update hwdef.dat
jstc4ll Jun 21, 2024
b74dc4a
Update hwdef.dat
jstc4ll Jun 21, 2024
e2e76f8
Update hwdef.dat
jstc4ll Jun 21, 2024
d46b8d1
Update hwdef.dat
jstc4ll Jun 21, 2024
3dc58bf
Update hwdef.dat
jstc4ll Jun 24, 2024
ef42fdc
Update hwdef.dat
jstc4ll Jun 24, 2024
111af3b
Update hwdef.dat
jstc4ll Jun 24, 2024
420046a
Update hwdef.dat
jstc4ll Jun 24, 2024
99ee440
Update hwdef.dat
jstc4ll Jun 24, 2024
7e251b4
Update hwdef.dat
jstc4ll Jun 24, 2024
d5db363
Update hwdef.dat
jstc4ll Jun 24, 2024
b326b2a
Update hwdef.dat
jstc4ll Jun 25, 2024
0ac1039
Update hwdef.dat
jstc4ll Jun 25, 2024
3757c56
Update hwdef.dat
jstc4ll Jun 25, 2024
bccf09a
Update hwdef-bl.dat
jstc4ll Jun 25, 2024
738d0d8
Update hwdef.dat
jstc4ll Jun 25, 2024
d0a19aa
Update hwdef.dat
jstc4ll Jun 25, 2024
9a14d5a
Update hwdef.dat
jstc4ll Jun 25, 2024
d7a9b09
Update hwdef.dat
jstc4ll Jun 25, 2024
b98782d
Update hwdef.dat
jstc4ll Jun 25, 2024
176c55f
Update hwdef.dat
jstc4ll Jun 25, 2024
5c20d06
Update hwdef.dat
jstc4ll Jun 25, 2024
82cbc8b
Update hwdef.dat
jstc4ll Jun 25, 2024
d625351
Merge branch 'ArduPilot:master' into master
jstc4ll Oct 31, 2024
0d682ba
Update hwdef-bl.dat
jstc4ll Nov 5, 2024
2b9a2df
Update hwdef.dat
jstc4ll Nov 5, 2024
6a265a8
Create hwdef_INA239
jstc4ll Nov 11, 2024
867b452
Rename hwdef_INA239 to hwdef_INA239.dat
jstc4ll Nov 11, 2024
cff35c9
Rename hwdef.dat to hwdef_old.dat
jstc4ll Nov 11, 2024
dc4cd05
Rename hwdef_INA239.dat to hwdef.dat
jstc4ll Nov 11, 2024
fb79538
Update hwdef.dat
jstc4ll Nov 11, 2024
eb9a888
Update hwdef.dat
jstc4ll Nov 11, 2024
6bd9336
Update hwdef.dat
jstc4ll Nov 11, 2024
e39c3dc
Update hwdef.dat
jstc4ll Nov 11, 2024
205878e
Update hwdef.dat
jstc4ll Nov 13, 2024
43fc998
Update hwdef.dat
jstc4ll Nov 13, 2024
86a64de
Update hwdef.dat
jstc4ll Nov 13, 2024
d40f862
Update hwdef.dat
jstc4ll Nov 14, 2024
1c8e7b4
Update hwdef.dat
jstc4ll Nov 14, 2024
78d4900
Update hwdef.dat
jstc4ll Nov 14, 2024
06dc43e
Merge branch 'ArduPilot:master' into master
jstc4ll Nov 14, 2024
7ad09c0
Create hwdef.dat
jstc4ll Nov 14, 2024
ff64453
Create hwdef-bl.dat
jstc4ll Nov 14, 2024
4db700f
Create hwdef_old.dat
jstc4ll Nov 14, 2024
00e61bd
Delete libraries/AP_HAL_ChibiOS/hwdef/Inferno-PMU directory
jstc4ll Nov 14, 2024
3c93ef5
Update hwdef.dat
jstc4ll Nov 14, 2024
9ed5f7e
Update hwdef.dat
jstc4ll Nov 15, 2024
db9ea53
Update hwdef.dat
jstc4ll Nov 15, 2024
42df500
Create defaults.parm
jstc4ll Nov 15, 2024
6ae91af
Update hwdef-bl.dat
jstc4ll Nov 15, 2024
26868d4
Update hwdef.dat
jstc4ll Nov 15, 2024
1dd7707
Update hwdef.dat
jstc4ll Nov 15, 2024
8fe2ddf
Update hwdef-bl.dat
jstc4ll Nov 15, 2024
ab7b928
Update hwdef.dat
jstc4ll Nov 15, 2024
b725a88
Update defaults.parm
jstc4ll Nov 15, 2024
2b3f3e2
Update hwdef.dat
jstc4ll Nov 15, 2024
6f20723
Update hwdef-bl.dat
jstc4ll Nov 15, 2024
d0bc97d
Update board_types.txt
jstc4ll Nov 15, 2024
97e3a97
Merge branch 'ArduPilot:master' into master
jstc4ll Nov 15, 2024
1bb43c3
Merge branch 'ArduPilot:master' into master
jstc4ll Nov 20, 2024
8906cb3
Delete libraries/AP_HAL_ChibiOS/hwdef/CSKY-PMU/hwdef_old.dat
jstc4ll Nov 20, 2024
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
26 changes: 26 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CSKY-PMU/defaults.parm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FORMAT_VERSION 0
CAN_NODE 0
CAN_BAUDRATE 1000000
FLASH_BOOTLOADER 0
DEBUG 0
BRD_SERIAL_NUM 0
BATT_MONITOR 26
BATT_CAPACITY 3300
BATT_SERIAL_NUM 0
BATT_MAX_AMPS 204.8
BATT_SHUNT 0.0002
BATT_HIDE_MASK 0
TEMP1_TYPE 5
TEMP1_BUS 0
TEMP1_ADDR 0
TEMP1_SRC 0
TEMP1_SRC_ID 0
TEMP1_PIN 3
TEMP1_A0 -41.0
TEMP1_A1 50.0
TEMP1_A2 0.0
TEMP1_A3 0.0
TEMP1_A4 0.0
TEMP1_A5 0.0
TEMP_MSG_RATE 0
OPTIONS 0
65 changes: 65 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CSKY-PMU/hwdef-bl.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# hw definition file for processing by chibios_pins.py

# CSKY-PMU Bootloader

# MCU class and specific type
MCU STM32F4xx STM32F412Rx

# bootloader loads at start of flash
FLASH_RESERVE_START_KB 0

# location of application code
FLASH_BOOTLOADER_LOAD_KB 64

# board ID for firmware load
APJ_BOARD_ID 1212

# crystal frequency
OSCILLATOR_HZ 8000000

# setup build for a peripheral firmware
env AP_PERIPH 1

define CH_CFG_ST_FREQUENCY 1000000

# Flash available
FLASH_SIZE_KB 512

# order of UARTs
SERIAL_ORDER

PB14 LED_BOOTLOADER OUTPUT HIGH
define HAL_LED_ON 1

# USART1
PB6 USART1_TX USART1
PB7 USART1_RX USART1

# SWD debugging
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD

define HAL_USE_SERIAL TRUE

define STM32_SERIAL_USE_USART1 TRUE
define STM32_SERIAL_USE_USART2 FALSE
define STM32_SERIAL_USE_USART3 FALSE

define HAL_NO_GPIO_IRQ
define HAL_USE_EMPTY_IO TRUE

# avoid timer thread to save memory
define HAL_NO_TIMER_THREAD

define DMA_RESERVE_SIZE 0

# enable CAN support
PB8 CAN1_RX CAN1
PB9 CAN1_TX CAN1
PB5 GPIO_CAN1_SILENT OUTPUT PUSHPULL SPEED_LOW LOW

# make bl baudrate match debug baudrate for easier debugging
define BOOTLOADER_BAUDRATE 57600

# use a small bootloader timeout
define HAL_BOOTLOADER_TIMEOUT 1000
91 changes: 91 additions & 0 deletions libraries/AP_HAL_ChibiOS/hwdef/CSKY-PMU/hwdef.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# hw definition file for processing by chibios_pins.py

# MCU class and specific type
MCU STM32F4xx STM32F412Rx

# bootloader starts firmware at 64k
FLASH_RESERVE_START_KB 64

# store parameters in pages 2 and 3
STORAGE_FLASH_PAGE 2
define HAL_STORAGE_SIZE 8192

# board ID for firmware load
APJ_BOARD_ID 1212

# setup build for a peripheral firmware
env AP_PERIPH 1

# ChibiOS system timer
STM32_ST_USE_TIMER 5

# crystal frequency
OSCILLATOR_HZ 8000000

define CH_CFG_ST_FREQUENCY 1000000

# assume 512k flash part
FLASH_SIZE_KB 512

define HAL_NO_GPIO_IRQ
define SERIAL_BUFFERS_SIZE 512
define PORT_INT_REQUIRED_STACK 64

define DMA_RESERVE_SIZE 0

define HAL_NO_MONITOR_THREAD

# setup a small defaults.parm
define AP_PARAM_MAX_EMBEDDED_PARAM 512

# order of UARTs
SERIAL_ORDER USART1 EMPTY EMPTY EMPTY

# USART1 for debug
PB6 USART1_TX USART1 NODMA
PB7 USART1_RX USART1 NODMA
define DEFAULT_SERIAL0_BAUD 57600

# debugger support
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD

# activity LED
PB14 LED OUTPUT HIGH
define HAL_LED_ON 1

#CAN bus
CAN_ORDER 1
PB8 CAN1_RX CAN1
PB9 CAN1_TX CAN1
PB5 GPIO_CAN1_SILENT OUTPUT PUSHPULL SPEED_LOW LOW

define CAN_APP_NODE_NAME "org.csky.pmu"
define HAL_CAN_POOL_SIZE 6000

# SPI1 RM3100
PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1
PA4 SPARE_CS CS
SPIDEV INA23X SPI1 DEVID1 SPARE_CS MODE1 10*MHZ 10*MHZ

# enable temperature
define AP_TEMPERATURE_SENSOR_ENABLED 1
define AP_TEMPERATURE_SENSOR_MAX_INSTANCES 1
define HAL_PERIPH_ENABLE_DEVICE_TEMPERATURE

# ADC
define HAL_USE_ADC TRUE
define STM32_ADC_USE_ADC1 TRUE

PA3 BATT_TEMP_SENS ADC1 SCALE(1)

# enable battery monitor
define HAL_PERIPH_ENABLE_BATTERY
define AP_BATTERY_INA239_ENABLED 1
define AP_BATTERY_INA239_SPI_DEVICE "INA23X"
define HAL_BATT_MONITOR_DEFAULT 26

# bootloader embedding / bootloader flashing not available
define AP_BOOTLOADER_FLASHING_ENABLED 0
Loading