Compare commits
48 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe7bf8472b | |||
| ca336fb299 | |||
| 5cdc783b05 | |||
| 5037a96376 | |||
| 8e0cabaeb7 | |||
| 338595edd1 | |||
| f219c9f3b9 | |||
| 1345b3500a | |||
| 8604604a5b | |||
| d62f112017 | |||
| 14186cf74f | |||
| 5fe82aa485 | |||
| b92d21bd31 | |||
| 12745baf6c | |||
| c25fcabcc6 | |||
| 67d62cb371 | |||
| 0704580a30 | |||
| 38eaa8b1d3 | |||
| 16eac303de | |||
| aadb83a220 | |||
| 3a2ce0925d | |||
| 29ba83109c | |||
| 7919959f5a | |||
| 703d66e605 | |||
| 73a8fc8fb0 | |||
| 9b106f71a0 | |||
| b06094c737 | |||
| 96e5862d88 | |||
| 98d8090458 | |||
| 3ebb47d53f | |||
| b0008e99ff | |||
| c962c6a2c1 | |||
| 18477554e0 | |||
| bcd67b7bad | |||
| fcddea4410 | |||
| ca83b8330d | |||
| a7de5d176f | |||
| 3e1c499d5d | |||
| 1d00e4e8aa | |||
| f90b1b375c | |||
| 73e71feb47 | |||
| 45f9fb45c1 | |||
| e3f05f1bbe | |||
| c0e0d9a080 | |||
| 87c05c9181 | |||
| c41aab6ddf | |||
| 45cad9f85c | |||
| 00509d540d |
@@ -0,0 +1,62 @@
|
||||
name: Sync ROS 2 messages to px4_msgs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'stable'
|
||||
- 'beta'
|
||||
- 'release/**'
|
||||
paths:
|
||||
- 'msg/**'
|
||||
- 'srv/**'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
sync_to_px4_msgs:
|
||||
if: github.repository == 'PX4/PX4-Autopilot'
|
||||
runs-on: [runs-on,runner=4cpu-linux-x64,image=ubuntu22-full-x64,"run-id=${{ github.run_id }}",spot=false]
|
||||
steps:
|
||||
- name: Checkout PX4 repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup git credentials
|
||||
run: |
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
|
||||
- name: Clone PX4_msgs repo
|
||||
run: |
|
||||
git clone https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/px4_msgs.git
|
||||
|
||||
- name: Check out the same branch as the PX4 repo
|
||||
run: |
|
||||
cd px4_msgs
|
||||
if git checkout ${{ github.ref_name }}; then
|
||||
echo "Checked out existing branch"
|
||||
else
|
||||
git checkout -b ${{ github.ref_name }}
|
||||
fi
|
||||
|
||||
- name: Copy ROS 2 messages
|
||||
run: |
|
||||
rm -f px4_msgs/msg/*.msg
|
||||
rm -f px4_msgs/msg/versioned/*.msg
|
||||
rm -f px4_msgs/srv/*.srv
|
||||
rm -f px4_msgs/srv/versioned/*.srv
|
||||
cp msg/*.msg px4_msgs/msg/
|
||||
cp msg/versioned/*.msg px4_msgs/msg/ || true
|
||||
cp srv/*.srv px4_msgs/srv/
|
||||
cp srv/versioned/*.srv px4_msgs/srv/ || true
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
cd px4_msgs
|
||||
git status
|
||||
git add .
|
||||
git commit -a -m "Update to PX4 ${{ github.sha }}" || true
|
||||
git push origin ${{ github.ref_name }} || true
|
||||
cd ..
|
||||
rm -rf px4_msgs
|
||||
@@ -531,3 +531,13 @@ CONFIG:
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: svehicle_e2_default
|
||||
x-mav_ap-h743r1_bootloader:
|
||||
short: x-mav_ap-h743r1-boot
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743r1_bootloader
|
||||
x-mav_ap-h743r1_default:
|
||||
short: x-mav_ap-h743r1
|
||||
buildType: MinSizeRel
|
||||
settings:
|
||||
CONFIG: x-mav_ap-h743r1_default
|
||||
|
||||
@@ -220,36 +220,6 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('PX4 ROS msgs') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
}
|
||||
steps {
|
||||
sh('export')
|
||||
sh('make distclean; git clean -ff -x -d .')
|
||||
withCredentials([usernamePassword(credentialsId: 'px4buildbot_github_personal_token', passwordVariable: 'GIT_PASS', usernameVariable: 'GIT_USER')]) {
|
||||
sh("git clone https://${GIT_USER}:${GIT_PASS}@github.com/PX4/px4_msgs.git")
|
||||
// 'main' branch
|
||||
sh('rm -f px4_msgs/msg/*.msg')
|
||||
sh('rm -f px4_msgs/msg/versioned/*.msg')
|
||||
sh('rm -f px4_msgs/srv/*.srv')
|
||||
sh('rm -f px4_msgs/srv/versioned/*.srv')
|
||||
sh('cp msg/*.msg px4_msgs/msg/')
|
||||
sh('cp msg/versioned/*.msg px4_msgs/msg/ || true')
|
||||
sh('cp srv/*.srv px4_msgs/srv/')
|
||||
sh('cp srv/versioned/*.srv px4_msgs/srv/ || true')
|
||||
sh('cd px4_msgs; git status; git add .; git commit -a -m "Update message definitions `date`" || true')
|
||||
sh('cd px4_msgs; git push origin main || true')
|
||||
sh('rm -rf px4_msgs')
|
||||
}
|
||||
}
|
||||
when {
|
||||
anyOf {
|
||||
branch 'main'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('S3') {
|
||||
agent {
|
||||
docker { image 'px4io/px4-dev-base-focal:2021-08-18' }
|
||||
|
||||
@@ -25,15 +25,15 @@ parser.add_argument('-p', '--pretty', dest='pretty', action='store_true',
|
||||
help='Pretty output instead of a single line')
|
||||
parser.add_argument('-g', '--groups', dest='group', action='store_true',
|
||||
help='Groups targets')
|
||||
parser.add_argument('-f', '--filter', dest='filter', help='comma separated list of board names to use instead of all')
|
||||
parser.add_argument('-f', '--filter', dest='filter', help='comma separated list of build target name prefixes to include instead of all e.g. "px4_fmu-v5_"')
|
||||
|
||||
args = parser.parse_args()
|
||||
verbose = args.verbose
|
||||
|
||||
board_filter = []
|
||||
target_filter = []
|
||||
if args.filter:
|
||||
for board in args.filter.split(','):
|
||||
board_filter.append(board)
|
||||
for target in args.filter.split(','):
|
||||
target_filter.append(target)
|
||||
|
||||
default_container = 'ghcr.io/px4/px4-dev:v1.16.0-rc1-258-g0369abd556'
|
||||
build_configs = []
|
||||
@@ -144,7 +144,7 @@ for manufacturer in os.scandir(os.path.join(source_dir, '../boards')):
|
||||
label = files.name[:-9]
|
||||
target_name = manufacturer.name + '_' + board.name + '_' + label
|
||||
|
||||
if board_filter and not board_name in board_filter:
|
||||
if target_filter and not any(target_name.startswith(f) for f in target_filter):
|
||||
if verbose: print(f'excluding board {board_name} ({target_name})')
|
||||
continue
|
||||
|
||||
|
||||
@@ -1675,7 +1675,7 @@ baro_0_x_resample = fit_coef_baro_0_x(temp_rel_resample)
|
||||
plt.figure(13,figsize=(20,13))
|
||||
|
||||
# draw plots
|
||||
plt.plot(sensor_baro_0['temperature'],100*sensor_baro_0['pressure']-100*median_pressure,'b')
|
||||
plt.plot(sensor_baro_0['temperature'],sensor_baro_0['pressure']-median_pressure,'b')
|
||||
plt.plot(temp_resample,baro_0_x_resample,'r')
|
||||
plt.title('Baro 0 ({}) Bias vs Temperature'.format(baro_0_params['TC_B0_ID']))
|
||||
plt.ylabel('Z bias (Pa)')
|
||||
@@ -1736,7 +1736,7 @@ if num_baros >= 2:
|
||||
plt.figure(14,figsize=(20,13))
|
||||
|
||||
# draw plots
|
||||
plt.plot(sensor_baro_1['temperature'],100*sensor_baro_1['pressure']-100*median_pressure,'b')
|
||||
plt.plot(sensor_baro_1['temperature'],sensor_baro_1['pressure']-median_pressure,'b')
|
||||
plt.plot(temp_resample,baro_1_x_resample,'r')
|
||||
plt.title('Baro 1 ({}) Bias vs Temperature'.format(baro_1_params['TC_B1_ID']))
|
||||
plt.ylabel('Z bias (Pa)')
|
||||
@@ -1797,7 +1797,7 @@ if num_baros >= 3:
|
||||
plt.figure(15,figsize=(20,13))
|
||||
|
||||
# draw plots
|
||||
plt.plot(sensor_baro_2['temperature'],100*sensor_baro_2['pressure']-100*median_pressure,'b')
|
||||
plt.plot(sensor_baro_2['temperature'],sensor_baro_2['pressure']-median_pressure,'b')
|
||||
plt.plot(temp_resample,baro_2_x_resample,'r')
|
||||
plt.title('Baro 2 ({}) Bias vs Temperature'.format(baro_2_params['TC_B2_ID']))
|
||||
plt.ylabel('Z bias (Pa)')
|
||||
@@ -1853,7 +1853,7 @@ if num_baros >= 4:
|
||||
plt.figure(16,figsize=(20,13))
|
||||
|
||||
# draw plots
|
||||
plt.plot(sensor_baro_3['temperature'],100*sensor_baro_3['pressure']-100*median_pressure,'b')
|
||||
plt.plot(sensor_baro_3['temperature'],sensor_baro_3['pressure']-median_pressure,'b')
|
||||
plt.plot(temp_resample,baro_3_x_resample,'r')
|
||||
plt.title('Baro 3 ({}) Bias vs Temperature'.format(baro_3_params['TC_B3_ID']))
|
||||
plt.ylabel('Z bias (Pa)')
|
||||
|
||||
@@ -40,6 +40,7 @@ CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PX4IO=y
|
||||
CONFIG_COMMON_RC=y
|
||||
|
||||
@@ -97,5 +97,11 @@ bmm150 -I start
|
||||
# Internal Baro on I2C
|
||||
bmp388 -I start
|
||||
|
||||
# Start an external PWM generator
|
||||
if param greater PCA9685_EN_BUS 0
|
||||
then
|
||||
pca9685_pwm_out start
|
||||
fi
|
||||
|
||||
unset HAVE_PM2
|
||||
unset HAVE_PM3
|
||||
|
||||
@@ -21,6 +21,7 @@ CONFIG_DRIVERS_IMU_MURATA_SCH16T=y
|
||||
CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_DRIVERS_OSD_MSP_OSD=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
|
||||
@@ -16,3 +16,9 @@ iis2mdc -R 0 -I -b 4 start
|
||||
|
||||
# Internal Baro on I2C
|
||||
bmp388 -I -b 2 start
|
||||
|
||||
# Start an external PWM generator
|
||||
if param greater PCA9685_EN_BUS 0
|
||||
then
|
||||
pca9685_pwm_out start
|
||||
fi
|
||||
|
||||
@@ -19,6 +19,7 @@ CONFIG_COMMON_LIGHT=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_MEMSIC_MMC5983MA=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ST_IIS2MDC=y
|
||||
CONFIG_DRIVERS_OPTICAL_FLOW_PAW3902=y
|
||||
CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_COMMON_RC=y
|
||||
|
||||
@@ -34,3 +34,9 @@ paw3902 -s -b 3 start -Y 90
|
||||
|
||||
# Internal distance sensor
|
||||
afbrs50 start
|
||||
|
||||
# Start an external PWM generator
|
||||
if param greater PCA9685_EN_BUS 0
|
||||
then
|
||||
pca9685_pwm_out start
|
||||
fi
|
||||
|
||||
@@ -26,7 +26,6 @@ CONFIG_DRIVERS_PCA9685_PWM_OUT=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA226=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA228=y
|
||||
CONFIG_DRIVERS_POWER_MONITOR_INA238=y
|
||||
CONFIG_DRIVERS_ROBOCLAW=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_BOARD_UAVCAN_INTERFACES=1
|
||||
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=2
|
||||
@@ -66,9 +65,6 @@ CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODE_NAVIGATOR_VTOL_TAKEOFF=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_ROVER_ACKERMANN=y
|
||||
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
|
||||
CONFIG_MODULES_ROVER_MECANUM=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_SIMULATION_SIMULATOR_SIH=y
|
||||
CONFIG_MODULES_TIME_PERSISTOR=y
|
||||
@@ -89,7 +85,6 @@ CONFIG_SYSTEMCMDS_PARAM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
CONFIG_SYSTEMCMDS_SERIAL_TEST=y
|
||||
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
CONFIG_SYSTEMCMDS_TOP=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
|
||||
@@ -74,5 +74,5 @@ ist8310 -X -b 1 -R 10 start
|
||||
# Start an external PWM generator
|
||||
if param greater PCA9685_EN_BUS 0
|
||||
then
|
||||
pca9685_pwm_out start -b 1
|
||||
pca9685_pwm_out start
|
||||
fi
|
||||
|
||||
@@ -11,3 +11,7 @@ param set BAT1_V_DIV 5.7
|
||||
|
||||
# Always keep current config
|
||||
param set SYS_AUTOCONFIG 0
|
||||
|
||||
# PCA9685 PWM Out defaults
|
||||
param set-default PCA9685_EN_BUS 4
|
||||
param set-default PCA9685_I2C_ADDR 64
|
||||
|
||||
@@ -28,7 +28,7 @@ then
|
||||
echo "ads1115 not found."
|
||||
fi
|
||||
|
||||
if ! pca9685_pwm_out start -a 0x40 -b 4
|
||||
if ! pca9685_pwm_out start
|
||||
then
|
||||
echo "pca9685_pwm_out not found."
|
||||
fi
|
||||
|
||||
@@ -47,6 +47,7 @@ CONFIG_DRIVERS_SAFETY_BUTTON=y
|
||||
CONFIG_COMMON_TELEMETRY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_BOARD_UAVCAN_INTERFACES=3
|
||||
CONFIG_COMMON_UWB=y
|
||||
CONFIG_MODULES_AIRSPEED_SELECTOR=y
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
add_subdirectory(pwm_voltage)
|
||||
@@ -0,0 +1,4 @@
|
||||
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
|
||||
CONFIG_BOARD_ARCHITECTURE="cortex-m7"
|
||||
CONFIG_BOARD_ROMFSROOT=""
|
||||
CONFIG_ARCH_CHIP_STM32H7=y
|
||||
@@ -0,0 +1,92 @@
|
||||
CONFIG_BOARD_TOOLCHAIN="arm-none-eabi"
|
||||
CONFIG_BOARD_ARCHITECTURE="cortex-m7"
|
||||
CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS0"
|
||||
CONFIG_BOARD_SERIAL_GPS2="/dev/ttyS1"
|
||||
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS2"
|
||||
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS3"
|
||||
CONFIG_BOARD_SERIAL_TEL3="/dev/ttyS5"
|
||||
CONFIG_BOARD_SERIAL_TEL4="/dev/ttyS6"
|
||||
CONFIG_DRIVERS_ADC_BOARD_ADC=y
|
||||
CONFIG_DRIVERS_BAROMETER_DPS310=y
|
||||
CONFIG_DRIVERS_BAROMETER_GOERTEK_SPL06=y
|
||||
CONFIG_DRIVERS_CAMERA_CAPTURE=y
|
||||
CONFIG_DRIVERS_CAMERA_TRIGGER=y
|
||||
CONFIG_DRIVERS_CDCACM_AUTOSTART=y
|
||||
CONFIG_COMMON_DIFFERENTIAL_PRESSURE=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_TF02PRO=y
|
||||
CONFIG_DRIVERS_DISTANCE_SENSOR_TFMINI=y
|
||||
CONFIG_DRIVERS_DSHOT=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI270=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_ISENTEK_IST8310=y
|
||||
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
CONFIG_COMMON_OSD=y
|
||||
CONFIG_DRIVERS_PWM_OUT=y
|
||||
CONFIG_DRIVERS_PX4IO=y
|
||||
CONFIG_COMMON_RC=y
|
||||
CONFIG_COMMON_TELEMETRY=y
|
||||
CONFIG_DRIVERS_TONE_ALARM=y
|
||||
CONFIG_DRIVERS_UAVCAN=y
|
||||
CONFIG_BOARD_UAVCAN_TIMER_OVERRIDE=4
|
||||
CONFIG_MODULES_BATTERY_STATUS=y
|
||||
CONFIG_MODULES_CAMERA_FEEDBACK=y
|
||||
CONFIG_MODULES_COMMANDER=y
|
||||
CONFIG_MODULES_CONTROL_ALLOCATOR=y
|
||||
CONFIG_MODULES_DATAMAN=y
|
||||
CONFIG_MODULES_EKF2=y
|
||||
CONFIG_MODULES_EVENTS=y
|
||||
CONFIG_MODULES_FLIGHT_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=y
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=y
|
||||
CONFIG_MODULES_FW_MODE_MANAGER=y
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=y
|
||||
CONFIG_MODULES_GIMBAL=y
|
||||
CONFIG_MODULES_GYRO_CALIBRATION=y
|
||||
CONFIG_MODULES_GYRO_FFT=y
|
||||
CONFIG_MODULES_LAND_DETECTOR=y
|
||||
CONFIG_MODULES_LANDING_TARGET_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOAD_MON=y
|
||||
CONFIG_MODULES_LOCAL_POSITION_ESTIMATOR=y
|
||||
CONFIG_MODULES_LOGGER=y
|
||||
CONFIG_MODULES_MAG_BIAS_ESTIMATOR=y
|
||||
CONFIG_MODULES_MANUAL_CONTROL=y
|
||||
CONFIG_MODULES_MAVLINK=y
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=y
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=y
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=y
|
||||
CONFIG_MODULES_MC_POS_CONTROL=y
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=y
|
||||
CONFIG_MODULES_NAVIGATOR=y
|
||||
CONFIG_MODULES_RC_UPDATE=y
|
||||
CONFIG_MODULES_SENSORS=y
|
||||
CONFIG_MODULES_TEMPERATURE_COMPENSATION=y
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_ACTUATOR_TEST=y
|
||||
CONFIG_SYSTEMCMDS_BL_UPDATE=y
|
||||
CONFIG_SYSTEMCMDS_DMESG=y
|
||||
CONFIG_SYSTEMCMDS_DUMPFILE=y
|
||||
CONFIG_SYSTEMCMDS_GPIO=y
|
||||
CONFIG_SYSTEMCMDS_HARDFAULT_LOG=y
|
||||
CONFIG_SYSTEMCMDS_I2CDETECT=y
|
||||
CONFIG_SYSTEMCMDS_LED_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_MFT=y
|
||||
CONFIG_SYSTEMCMDS_MTD=y
|
||||
CONFIG_SYSTEMCMDS_NSHTERM=y
|
||||
CONFIG_SYSTEMCMDS_PARAM=y
|
||||
CONFIG_SYSTEMCMDS_PERF=y
|
||||
CONFIG_SYSTEMCMDS_REBOOT=y
|
||||
CONFIG_SYSTEMCMDS_SD_BENCH=y
|
||||
CONFIG_SYSTEMCMDS_SD_STRESS=y
|
||||
CONFIG_SYSTEMCMDS_SYSTEM_TIME=y
|
||||
CONFIG_SYSTEMCMDS_TOP=y
|
||||
CONFIG_SYSTEMCMDS_TOPIC_LISTENER=y
|
||||
CONFIG_SYSTEMCMDS_TUNE_CONTROL=y
|
||||
CONFIG_SYSTEMCMDS_UORB=y
|
||||
CONFIG_SYSTEMCMDS_USB_CONNECTED=y
|
||||
CONFIG_SYSTEMCMDS_VER=y
|
||||
CONFIG_SYSTEMCMDS_WORK_QUEUE=y
|
||||
CONFIG_EXAMPLES_FAKE_GPS=y
|
||||
CONFIG_ARCH_CHIP_STM32H7=y
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"board_id": 1203,
|
||||
"magic": "PX4FWv1",
|
||||
"description": "Firmware for the AP-H743r1 board",
|
||||
"image": "",
|
||||
"build_time": 0,
|
||||
"summary": "AP-H743r1",
|
||||
"version": "0.1",
|
||||
"image_size": 0,
|
||||
"image_maxsize": 1966080,
|
||||
"git_identity": "",
|
||||
"board_revision": 0
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
param set-default BAT1_A_PER_V 17
|
||||
param set-default BAT1_N_CELLS 4
|
||||
param set-default BAT1_V_CHARGED 4.2
|
||||
param set-default BAT1_V_DIV 10.1
|
||||
param set-default BAT1_V_EMPTY 3.2
|
||||
|
||||
param set-default SYS_HAS_MAG 1
|
||||
param set-default PWM_MAIN_TIM0 -4
|
||||
param set-default RC_INPUT_PROTO -1
|
||||
|
||||
param set-default IMU_GYRO_RATEMAX 2000
|
||||
param set-default SYS_AUTOSTART 4001
|
||||
param set-default MC_PITCHRATE_K 0.4
|
||||
param set-default MC_ROLLRATE_K 0.35
|
||||
param set-default MC_YAWRATE_K 1.2
|
||||
param set-default MC_YAWRATE_MAX 360
|
||||
param set-default MAV_TYPE 2
|
||||
param set-default CA_AIRFRAME 0
|
||||
param set-default CA_ROTOR_COUNT 4
|
||||
param set-default CBRK_SUPPLY_CHK 894281
|
||||
|
||||
param set-default USB_MAV_MODE 5
|
||||
|
||||
# pwm voltage 3.3V/5V switch
|
||||
pwm_voltage_apply start
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific extras init
|
||||
#------------------------------------------------------------------------------
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# board specific sensors init
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
board_adc start
|
||||
|
||||
# IMU
|
||||
if ! icm42688p -s -b 1 -R 4 start
|
||||
then
|
||||
bmi270 -s -b 1 -R 4 start
|
||||
fi
|
||||
|
||||
if ! icm42688p -s -b 4 -R 4 start
|
||||
then
|
||||
bmi270 -s -b 4 -R 4 start
|
||||
fi
|
||||
|
||||
# baro
|
||||
if ! dps310 -I start -a 0x76
|
||||
then
|
||||
spl06 -I start -a 0x76
|
||||
fi
|
||||
|
||||
# internal mag
|
||||
ist8310 -I -R 6 start
|
||||
@@ -0,0 +1,17 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
config BOARD_HAS_PROBES
|
||||
bool "Board provides GPIO or other Hardware for signaling to timing analyze."
|
||||
default y
|
||||
---help---
|
||||
This board provides GPIO FMU-CH1-5, CAP1-6 as PROBE_1-11 to provide timing signals from selected drivers.
|
||||
|
||||
config BOARD_USE_PROBES
|
||||
bool "Enable the use the board provided FMU-CH1-5, CAP1-6 as PROBE_1-11"
|
||||
default n
|
||||
depends on BOARD_HAS_PROBES
|
||||
|
||||
---help---
|
||||
Select to use GPIO FMU-CH1-5, CAP1-6 to provide timing signals from selected drivers.
|
||||
@@ -0,0 +1,90 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DEV_CONSOLE is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
# CONFIG_SPI_EXCHANGE is not set
|
||||
# CONFIG_STM32H7_SYSCFG is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/x-mav/ap-h743r1/nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||
CONFIG_ARCH_CHIP="stm32h7"
|
||||
CONFIG_ARCH_CHIP_STM32H743VI=y
|
||||
CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=768
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_BOARDCTL=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_ASSERT_RESET_VALUE=0
|
||||
CONFIG_BOARD_INITTHREAD_PRIORITY=254
|
||||
CONFIG_BOARD_LATE_INITIALIZE=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_IFLOWCONTROL=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x0036
|
||||
CONFIG_CDCACM_PRODUCTSTR="X-MAV AP-H743r1 Bootloader"
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=12000
|
||||
CONFIG_CDCACM_VENDORID=0x1B8C
|
||||
CONFIG_CDCACM_VENDORSTR="X-MAV"
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEBUG_TCBINFO=y
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FDCLONE_DISABLE=y
|
||||
CONFIG_FDCLONE_STDIO=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=750
|
||||
CONFIG_INIT_ENTRYPOINT="bootloader_main"
|
||||
CONFIG_INIT_STACKSIZE=3194
|
||||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAM_SIZE=245760
|
||||
CONFIG_RAM_START=0x20010000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SIG_SIGALRM_ACTION=y
|
||||
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=30
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_STDIO_BUFFER_SIZE=32
|
||||
CONFIG_STM32H7_BKPSRAM=y
|
||||
CONFIG_STM32H7_DMA1=y
|
||||
CONFIG_STM32H7_OTGFS=y
|
||||
CONFIG_STM32H7_PROGMEM=y
|
||||
CONFIG_STM32H7_SERIAL_DISABLE_REORDERING=y
|
||||
CONFIG_STM32H7_TIM1=y
|
||||
CONFIG_STM32H7_USART6=y
|
||||
CONFIG_SYSTEMTICK_HOOK=y
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_TTY_SIGINT=y
|
||||
CONFIG_TTY_SIGINT_CHAR=0x03
|
||||
CONFIG_TTY_SIGTSTP=y
|
||||
CONFIG_USART6_RXBUFSIZE=600
|
||||
CONFIG_USART6_TXBUFSIZE=300
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBDEV_MAXPOWER=500
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
@@ -0,0 +1,442 @@
|
||||
/************************************************************************************
|
||||
* nuttx-configs/px4_fmu-v6u/include/board.h
|
||||
*
|
||||
* Copyright (C) 2016-2019 Gregory Nutt. All rights reserved.
|
||||
* Authors: David Sidrane <david.sidrane@nscdg.com>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************************/
|
||||
#ifndef __NUTTX_CONFIG_APH743R1_INCLUDE_BOARD_H
|
||||
#define __NUTTX_CONFIG_APH743R1_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
************************************************************************************/
|
||||
|
||||
#include "board_dma_map.h"
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include "stm32_rcc.h"
|
||||
#include "stm32_sdmmc.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
/* Clocking *************************************************************************/
|
||||
/* The AP-H743 R1 board provides the following clock sources:
|
||||
*
|
||||
* X1: 8 MHz crystal for HSE
|
||||
*
|
||||
* So we have these clock source available within the STM32
|
||||
*
|
||||
* HSI: 16 MHz RC factory-trimmed
|
||||
* HSE: 16 MHz crystal for HSE
|
||||
*/
|
||||
|
||||
#define STM32_BOARD_XTAL 8000000ul
|
||||
|
||||
#define STM32_HSI_FREQUENCY 16000000ul
|
||||
#define STM32_LSI_FREQUENCY 32000
|
||||
#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL
|
||||
#define STM32_LSE_FREQUENCY 32768
|
||||
|
||||
/* Main PLL Configuration.
|
||||
*
|
||||
* PLL source is HSE = 16,000,000
|
||||
*
|
||||
* PLL_VCOx = (STM32_HSE_FREQUENCY / PLLM) * PLLN
|
||||
* Subject to:
|
||||
*
|
||||
* 1 <= PLLM <= 63
|
||||
* 4 <= PLLN <= 512
|
||||
* 150 MHz <= PLL_VCOL <= 420MHz
|
||||
* 192 MHz <= PLL_VCOH <= 836MHz
|
||||
*
|
||||
* SYSCLK = PLL_VCO / PLLP
|
||||
* CPUCLK = SYSCLK / D1CPRE
|
||||
* Subject to
|
||||
*
|
||||
* PLLP1 = {2, 4, 6, 8, ..., 128}
|
||||
* PLLP2,3 = {2, 3, 4, ..., 128}
|
||||
* CPUCLK <= 480 MHz
|
||||
*/
|
||||
|
||||
#define STM32_BOARD_USEHSE
|
||||
|
||||
#define STM32_PLLCFG_PLLSRC RCC_PLLCKSELR_PLLSRC_HSE
|
||||
|
||||
/* PLL1, wide 4 - 8 MHz input, enable DIVP, DIVQ, DIVR
|
||||
*
|
||||
* PLL1_VCO = (8,000,000 / 1) * 120 = 960 MHz
|
||||
*
|
||||
* PLL1P = PLL1_VCO/2 = 960 MHz / 2 = 480 MHz
|
||||
* PLL1Q = PLL1_VCO/4 = 960 MHz / 4 = 240 MHz
|
||||
* PLL1R = PLL1_VCO/8 = 960 MHz / 8 = 120 MHz
|
||||
*/
|
||||
|
||||
#define STM32_PLLCFG_PLL1CFG (RCC_PLLCFGR_PLL1VCOSEL_WIDE | \
|
||||
RCC_PLLCFGR_PLL1RGE_4_8_MHZ | \
|
||||
RCC_PLLCFGR_DIVP1EN | \
|
||||
RCC_PLLCFGR_DIVQ1EN | \
|
||||
RCC_PLLCFGR_DIVR1EN)
|
||||
#define STM32_PLLCFG_PLL1M RCC_PLLCKSELR_DIVM1(1)
|
||||
#define STM32_PLLCFG_PLL1N RCC_PLL1DIVR_N1(120)
|
||||
#define STM32_PLLCFG_PLL1P RCC_PLL1DIVR_P1(2)
|
||||
#define STM32_PLLCFG_PLL1Q RCC_PLL1DIVR_Q1(4)
|
||||
#define STM32_PLLCFG_PLL1R RCC_PLL1DIVR_R1(8)
|
||||
|
||||
#define STM32_VCO1_FREQUENCY ((STM32_HSE_FREQUENCY / 1) * 120)
|
||||
#define STM32_PLL1P_FREQUENCY (STM32_VCO1_FREQUENCY / 2)
|
||||
#define STM32_PLL1Q_FREQUENCY (STM32_VCO1_FREQUENCY / 4)
|
||||
#define STM32_PLL1R_FREQUENCY (STM32_VCO1_FREQUENCY / 8)
|
||||
|
||||
/* PLL2 */
|
||||
|
||||
#define STM32_PLLCFG_PLL2CFG (RCC_PLLCFGR_PLL2VCOSEL_WIDE | \
|
||||
RCC_PLLCFGR_PLL2RGE_4_8_MHZ | \
|
||||
RCC_PLLCFGR_DIVP2EN | \
|
||||
RCC_PLLCFGR_DIVQ2EN | \
|
||||
RCC_PLLCFGR_DIVR2EN)
|
||||
#define STM32_PLLCFG_PLL2M RCC_PLLCKSELR_DIVM2(2)
|
||||
#define STM32_PLLCFG_PLL2N RCC_PLL2DIVR_N2(48)
|
||||
#define STM32_PLLCFG_PLL2P RCC_PLL2DIVR_P2(2)
|
||||
#define STM32_PLLCFG_PLL2Q RCC_PLL2DIVR_Q2(2)
|
||||
#define STM32_PLLCFG_PLL2R RCC_PLL2DIVR_R2(2)
|
||||
|
||||
#define STM32_VCO2_FREQUENCY ((STM32_HSE_FREQUENCY / 2) * 48)
|
||||
#define STM32_PLL2P_FREQUENCY (STM32_VCO2_FREQUENCY / 2)
|
||||
#define STM32_PLL2Q_FREQUENCY (STM32_VCO2_FREQUENCY / 2)
|
||||
#define STM32_PLL2R_FREQUENCY (STM32_VCO2_FREQUENCY / 2)
|
||||
|
||||
/* PLL3 */
|
||||
|
||||
#define STM32_PLLCFG_PLL3CFG (RCC_PLLCFGR_PLL3VCOSEL_WIDE | \
|
||||
RCC_PLLCFGR_PLL3RGE_4_8_MHZ | \
|
||||
RCC_PLLCFGR_DIVQ3EN)
|
||||
#define STM32_PLLCFG_PLL3M RCC_PLLCKSELR_DIVM3(2)
|
||||
#define STM32_PLLCFG_PLL3N RCC_PLL3DIVR_N3(48)
|
||||
#define STM32_PLLCFG_PLL3P RCC_PLL3DIVR_P3(2)
|
||||
#define STM32_PLLCFG_PLL3Q RCC_PLL3DIVR_Q3(4)
|
||||
#define STM32_PLLCFG_PLL3R RCC_PLL3DIVR_R3(2)
|
||||
|
||||
#define STM32_VCO3_FREQUENCY ((STM32_HSE_FREQUENCY / 2) * 48)
|
||||
#define STM32_PLL3P_FREQUENCY (STM32_VCO3_FREQUENCY / 2)
|
||||
#define STM32_PLL3Q_FREQUENCY (STM32_VCO3_FREQUENCY / 4)
|
||||
#define STM32_PLL3R_FREQUENCY (STM32_VCO3_FREQUENCY / 2)
|
||||
|
||||
/* SYSCLK = PLL1P = 480MHz
|
||||
* CPUCLK = SYSCLK / 1 = 480 MHz
|
||||
*/
|
||||
|
||||
#define STM32_RCC_D1CFGR_D1CPRE (RCC_D1CFGR_D1CPRE_SYSCLK)
|
||||
#define STM32_SYSCLK_FREQUENCY (STM32_PLL1P_FREQUENCY)
|
||||
#define STM32_CPUCLK_FREQUENCY (STM32_SYSCLK_FREQUENCY / 1)
|
||||
|
||||
/* Configure Clock Assignments */
|
||||
|
||||
/* AHB clock (HCLK) is SYSCLK/2 (240 MHz max)
|
||||
* HCLK1 = HCLK2 = HCLK3 = HCLK4 = 240
|
||||
*/
|
||||
|
||||
#define STM32_RCC_D1CFGR_HPRE RCC_D1CFGR_HPRE_SYSCLKd2 /* HCLK = SYSCLK / 2 */
|
||||
#define STM32_ACLK_FREQUENCY (STM32_CPUCLK_FREQUENCY / 2) /* ACLK in D1, HCLK3 in D1 */
|
||||
#define STM32_HCLK_FREQUENCY (STM32_CPUCLK_FREQUENCY / 2) /* HCLK in D2, HCLK4 in D3 */
|
||||
#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */
|
||||
|
||||
/* APB1 clock (PCLK1) is HCLK/2 (120 MHz) */
|
||||
|
||||
#define STM32_RCC_D2CFGR_D2PPRE1 RCC_D2CFGR_D2PPRE1_HCLKd2 /* PCLK1 = HCLK / 2 */
|
||||
#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* APB2 clock (PCLK2) is HCLK/2 (120 MHz) */
|
||||
|
||||
#define STM32_RCC_D2CFGR_D2PPRE2 RCC_D2CFGR_D2PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */
|
||||
#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* APB3 clock (PCLK3) is HCLK/2 (120 MHz) */
|
||||
|
||||
#define STM32_RCC_D1CFGR_D1PPRE RCC_D1CFGR_D1PPRE_HCLKd2 /* PCLK3 = HCLK / 2 */
|
||||
#define STM32_PCLK3_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* APB4 clock (PCLK4) is HCLK/4 (120 MHz) */
|
||||
|
||||
#define STM32_RCC_D3CFGR_D3PPRE RCC_D3CFGR_D3PPRE_HCLKd2 /* PCLK4 = HCLK / 2 */
|
||||
#define STM32_PCLK4_FREQUENCY (STM32_HCLK_FREQUENCY/2)
|
||||
|
||||
/* Timer clock frequencies */
|
||||
|
||||
/* Timers driven from APB1 will be twice PCLK1 */
|
||||
|
||||
#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY)
|
||||
|
||||
/* Timers driven from APB2 will be twice PCLK2 */
|
||||
|
||||
#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM15_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM16_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
#define STM32_APB2_TIM17_CLKIN (2*STM32_PCLK2_FREQUENCY)
|
||||
|
||||
/* Kernel Clock Configuration
|
||||
*
|
||||
* Note: look at Table 54 in ST Manual
|
||||
*/
|
||||
|
||||
/* I2C123 clock source */
|
||||
|
||||
#define STM32_RCC_D2CCIP2R_I2C123SRC RCC_D2CCIP2R_I2C123SEL_HSI
|
||||
|
||||
/* I2C4 clock source */
|
||||
|
||||
#define STM32_RCC_D3CCIPR_I2C4SRC RCC_D3CCIPR_I2C4SEL_HSI
|
||||
|
||||
/* SPI123 clock source */
|
||||
|
||||
#define STM32_RCC_D2CCIP1R_SPI123SRC RCC_D2CCIP1R_SPI123SEL_PLL2
|
||||
|
||||
/* SPI45 clock source */
|
||||
|
||||
#define STM32_RCC_D2CCIP1R_SPI45SRC RCC_D2CCIP1R_SPI45SEL_PLL2
|
||||
|
||||
/* SPI6 clock source */
|
||||
|
||||
#define STM32_RCC_D3CCIPR_SPI6SRC RCC_D3CCIPR_SPI6SEL_PLL2
|
||||
|
||||
/* USB 1 and 2 clock source */
|
||||
|
||||
#define STM32_RCC_D2CCIP2R_USBSRC RCC_D2CCIP2R_USBSEL_PLL3
|
||||
|
||||
/* ADC 1 2 3 clock source */
|
||||
|
||||
#define STM32_RCC_D3CCIPR_ADCSEL RCC_D3CCIPR_ADCSEL_PLL2
|
||||
|
||||
/* FDCAN 1 clock source */
|
||||
|
||||
// #define STM32_RCC_D2CCIP1R_FDCANSEL RCC_D2CCIP1R_FDCANSEL_HSE /* FDCAN 1 2 clock source */
|
||||
|
||||
#define STM32_FDCANCLK STM32_HSE_FREQUENCY
|
||||
|
||||
/* FLASH wait states
|
||||
*
|
||||
* ------------ ---------- -----------
|
||||
* Vcore MAX ACLK WAIT STATES
|
||||
* ------------ ---------- -----------
|
||||
* 1.15-1.26 V 70 MHz 0
|
||||
* (VOS1 level) 140 MHz 1
|
||||
* 210 MHz 2
|
||||
* 1.05-1.15 V 55 MHz 0
|
||||
* (VOS2 level) 110 MHz 1
|
||||
* 165 MHz 2
|
||||
* 220 MHz 3
|
||||
* 0.95-1.05 V 45 MHz 0
|
||||
* (VOS3 level) 90 MHz 1
|
||||
* 135 MHz 2
|
||||
* 180 MHz 3
|
||||
* 225 MHz 4
|
||||
* ------------ ---------- -----------
|
||||
*/
|
||||
|
||||
#define BOARD_FLASH_WAITSTATES 2
|
||||
|
||||
/* SDMMC definitions ********************************************************/
|
||||
|
||||
/* Init 400kHz, freq = PLL1Q/(2*div) div = PLL1Q/(2*freq) */
|
||||
|
||||
#define STM32_SDMMC_INIT_CLKDIV (300 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
|
||||
|
||||
/* 25 MHz Max for now, 25 mHZ = PLL1Q/(2*div), div = PLL1Q/(2*freq)
|
||||
* div = 4.8 = 240 / 50, So round up to 5 for default speed 24 MB/s
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_STM32H7_SDMMC_XDMA) || defined(CONFIG_STM32H7_SDMMC_IDMA)
|
||||
# define STM32_SDMMC_MMCXFR_CLKDIV (5 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
|
||||
#else
|
||||
# define STM32_SDMMC_MMCXFR_CLKDIV (100 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
|
||||
#endif
|
||||
#if defined(CONFIG_STM32H7_SDMMC_XDMA) || defined(CONFIG_STM32H7_SDMMC_IDMA)
|
||||
# define STM32_SDMMC_SDXFR_CLKDIV (5 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
|
||||
#else
|
||||
# define STM32_SDMMC_SDXFR_CLKDIV (100 << STM32_SDMMC_CLKCR_CLKDIV_SHIFT)
|
||||
#endif
|
||||
|
||||
#define STM32_SDMMC_CLKCR_EDGE STM32_SDMMC_CLKCR_NEGEDGE
|
||||
|
||||
/* LED definitions ******************************************************************/
|
||||
/* The board has two, LED_GREEN a Green LED and LED_BLUE a Blue LED,
|
||||
* that can be controlled by software.
|
||||
*
|
||||
* If CONFIG_ARCH_LEDS is not defined, then the user can control the LEDs in any way.
|
||||
* The following definitions are used to access individual LEDs.
|
||||
*/
|
||||
|
||||
/* LED index values for use with board_userled() */
|
||||
|
||||
#define BOARD_LED1 0
|
||||
#define BOARD_LED2 1
|
||||
#define BOARD_LED3 2
|
||||
#define BOARD_NLEDS 3
|
||||
|
||||
#define BOARD_LED_RED BOARD_LED1
|
||||
#define BOARD_LED_GREEN BOARD_LED2
|
||||
#define BOARD_LED_BLUE BOARD_LED3
|
||||
|
||||
/* LED bits for use with board_userled_all() */
|
||||
|
||||
#define BOARD_LED1_BIT (1 << BOARD_LED1)
|
||||
#define BOARD_LED2_BIT (1 << BOARD_LED2)
|
||||
#define BOARD_LED3_BIT (1 << BOARD_LED3)
|
||||
|
||||
/* If CONFIG_ARCH_LEDS is defined, the usage by the board port is defined in
|
||||
* include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related
|
||||
* events as follows:
|
||||
*
|
||||
*
|
||||
* SYMBOL Meaning LED state
|
||||
* Red Green Blue
|
||||
* ---------------------- -------------------------- ------ ------ ----*/
|
||||
|
||||
#define LED_STARTED 0 /* NuttX has been started OFF OFF OFF */
|
||||
#define LED_HEAPALLOCATE 1 /* Heap has been allocated OFF OFF ON */
|
||||
#define LED_IRQSENABLED 2 /* Interrupts enabled OFF ON OFF */
|
||||
#define LED_STACKCREATED 3 /* Idle stack created OFF ON ON */
|
||||
#define LED_INIRQ 4 /* In an interrupt N/C N/C GLOW */
|
||||
#define LED_SIGNAL 5 /* In a signal handler N/C GLOW N/C */
|
||||
#define LED_ASSERTION 6 /* An assertion failed GLOW N/C GLOW */
|
||||
#define LED_PANIC 7 /* The system has crashed Blink OFF N/C */
|
||||
#define LED_IDLE 8 /* MCU is is sleep mode ON OFF OFF */
|
||||
|
||||
/* Thus if the Green LED is statically on, NuttX has successfully booted and
|
||||
* is, apparently, running normally. If the Red LED is flashing at
|
||||
* approximately 2Hz, then a fatal error has been detected and the system
|
||||
* has halted.
|
||||
*/
|
||||
|
||||
/* Alternate function pin selections ************************************************/
|
||||
|
||||
#define GPIO_USART1_RX GPIO_USART1_RX_2 /* PA10 */
|
||||
#define GPIO_USART1_TX GPIO_USART1_TX_2 /* PA9 */
|
||||
|
||||
#define GPIO_USART2_RX GPIO_USART2_RX_2 /* PD6 */
|
||||
#define GPIO_USART2_TX GPIO_USART2_TX_2 /* PD5 */
|
||||
|
||||
#define GPIO_USART3_RX GPIO_USART3_RX_3 /* PD9 */
|
||||
#define GPIO_USART3_TX GPIO_USART3_TX_3 /* PD8 */
|
||||
|
||||
#define GPIO_UART4_RX GPIO_UART4_RX_3 /* PB8 */
|
||||
#define GPIO_UART4_TX GPIO_UART4_TX_3 /* PB9 */
|
||||
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1 /* PC7 */
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1 /* PC6 */
|
||||
|
||||
#define GPIO_UART7_RX GPIO_UART7_RX_3 /* PE7 */
|
||||
#define GPIO_UART7_TX GPIO_UART7_TX_3 /* PE8 */
|
||||
|
||||
#define GPIO_UART8_RX GPIO_UART8_RX_1 /* PE0 */
|
||||
#define GPIO_UART8_TX GPIO_UART8_TX_1 /* PE1 */
|
||||
|
||||
/* SPI
|
||||
*
|
||||
*/
|
||||
#define ADJ_SLEW_RATE(p) (((p) & ~GPIO_SPEED_MASK) | (GPIO_SPEED_2MHz))
|
||||
|
||||
#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 /* PA6 */
|
||||
#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 /* PA7 */
|
||||
#define GPIO_SPI1_SCK ADJ_SLEW_RATE(GPIO_SPI1_SCK_1) /* PA5 */
|
||||
|
||||
#define GPIO_SPI3_MISO GPIO_SPI3_MISO_2 /* PC11 */
|
||||
#define GPIO_SPI3_MOSI GPIO_SPI3_MOSI_2 /* PC12 */
|
||||
#define GPIO_SPI3_SCK ADJ_SLEW_RATE(GPIO_SPI3_SCK_2) /* PC10 */
|
||||
|
||||
#define GPIO_SPI4_MISO GPIO_SPI4_MISO_2 /* PE5 */
|
||||
#define GPIO_SPI4_MOSI GPIO_SPI4_MOSI_2 /* PE6 */
|
||||
#define GPIO_SPI4_SCK ADJ_SLEW_RATE(GPIO_SPI4_SCK_2) /* PE2 */
|
||||
|
||||
/* I2C
|
||||
*
|
||||
*/
|
||||
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 /* PB6 */
|
||||
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1 /* PB7 */
|
||||
|
||||
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN6)
|
||||
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN7)
|
||||
|
||||
#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 /* PB10 */
|
||||
#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 /* PB11 */
|
||||
|
||||
#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN10)
|
||||
#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTB | GPIO_PIN11)
|
||||
|
||||
|
||||
#define GPIO_I2C4_SCL GPIO_I2C4_SCL_1 /* PD12 */
|
||||
#define GPIO_I2C4_SDA GPIO_I2C4_SDA_1 /* PD13 */
|
||||
|
||||
#define GPIO_I2C4_SCL_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTD | GPIO_PIN12)
|
||||
#define GPIO_I2C4_SDA_GPIO (GPIO_OUTPUT | GPIO_OPENDRAIN |GPIO_SPEED_2MHz | GPIO_OUTPUT_SET | GPIO_PORTD | GPIO_PIN13)
|
||||
|
||||
#define GPIO_CAN1_RX GPIO_CAN1_RX_3 /* PD0 */
|
||||
#define GPIO_CAN1_TX GPIO_CAN1_TX_3 /* PD1 */
|
||||
|
||||
#define GPIO_CAN2_RX GPIO_CAN2_RX_1 /* PB12 */
|
||||
#define GPIO_CAN2_TX GPIO_CAN2_TX_1 /* PB13 */
|
||||
|
||||
/* SDMMC2
|
||||
*
|
||||
* VDD 3.3
|
||||
* GND
|
||||
* SDMMC2_CK PD6
|
||||
* SDMMC2_CMD PD7
|
||||
* SDMMC2_D0 PB14
|
||||
* SDMMC2_D1 PB15
|
||||
* SDMMC2_D2 PG11
|
||||
* SDMMC2_D3 PB4
|
||||
*/
|
||||
|
||||
#define GPIO_SDMMC2_CK GPIO_SDMMC2_CK_2 /* PC1 */
|
||||
#define GPIO_SDMMC2_CMD GPIO_SDMMC2_CMD_1 /* PD7 */
|
||||
// #define GPIO_SDMMC2_D0 GPIO_SDMMC2_D0 /* PB14 */
|
||||
// #define GPIO_SDMMC2_D1 GPIO_SDMMC2_D1 /* PB15 */
|
||||
#define GPIO_SDMMC2_D2 GPIO_SDMMC2_D2_2 /* PB3 */
|
||||
// #define GPIO_SDMMC2_D3 GPIO_SDMMC2_D3 /* PB4 */
|
||||
|
||||
|
||||
#endif /*__NUTTX_CONFIG_APH743R1_INCLUDE_BOARD_H */
|
||||
@@ -0,0 +1,61 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
// DMAMUX1 Using at most 8 Channels on DMA1 -------- Assigned
|
||||
// V
|
||||
|
||||
#define DMAMAP_SPI1_RX DMAMAP_DMA12_SPI1RX_0 /* 1 DMA1:37 IMU */
|
||||
#define DMAMAP_SPI1_TX DMAMAP_DMA12_SPI1TX_0 /* 2 DMA1:38 IMU */
|
||||
|
||||
#define DMAMAP_SPI2_RX DMAMAP_DMA12_SPI2RX_0 /* DMA1:39 */
|
||||
#define DMAMAP_SPI2_TX DMAMAP_DMA12_SPI2TX_0 /* DMA1:40 */
|
||||
|
||||
#define DMAMAP_SPI4_RX DMAMAP_DMA12_SPI4RX_0 /* 3 DMA1:83 IMU */
|
||||
#define DMAMAP_SPI4_TX DMAMAP_DMA12_SPI4TX_0 /* 4 DMA1:84 IMU */
|
||||
|
||||
#define DMAMAP_USART1_RX DMAMAP_DMA12_USART1RX_0 /* DMA1:41 GPS1 */
|
||||
#define DMAMAP_USART1_TX DMAMAP_DMA12_USART1TX_0 /* DMA1:42 GPS1 */
|
||||
|
||||
#define DMAMAP_USART2_RX DMAMAP_DMA12_USART2RX_0 /* DMA1:43 GPS2 */
|
||||
#define DMAMAP_USART2_TX DMAMAP_DMA12_USART2TX_0 /* DMA1:44 GPS2 */
|
||||
|
||||
#define DMAMAP_USART3_RX DMAMAP_DMA12_USART3RX_0 /* DMA1:45 TELEM1 */
|
||||
#define DMAMAP_USART3_TX DMAMAP_DMA12_USART3TX_0 /* DMA1:46 TELEM1 */
|
||||
|
||||
#define DMAMAP_UART4_RX DMAMAP_DMA12_UART4RX_1 /* DMA1:63 TELEM2 */
|
||||
#define DMAMAP_UART4_TX DMAMAP_DMA12_UART4TX_1 /* DMA1:64 TELEM2 */
|
||||
|
||||
#define DMAMAP_USART6_RX DMAMAP_DMA12_USART6RX_0 /* DMA1:71 PX4IO */
|
||||
#define DMAMAP_USART6_TX DMAMAP_DMA12_USART6TX_0 /* DMA1:72 PX4IO */
|
||||
@@ -0,0 +1,273 @@
|
||||
#
|
||||
# This file is autogenerated: PLEASE DO NOT EDIT IT.
|
||||
#
|
||||
# You can use "make menuconfig" to make any modifications to the installed .config file.
|
||||
# You can then do "make savedefconfig" to generate a new defconfig file that includes your
|
||||
# modifications.
|
||||
#
|
||||
# CONFIG_DISABLE_ENVIRON is not set
|
||||
# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set
|
||||
# CONFIG_DISABLE_PTHREAD is not set
|
||||
# CONFIG_MMCSD_HAVE_CARDDETECT is not set
|
||||
# CONFIG_MMCSD_HAVE_WRITEPROTECT is not set
|
||||
# CONFIG_MMCSD_MMCSUPPORT is not set
|
||||
# CONFIG_MMCSD_SPI is not set
|
||||
# CONFIG_NSH_DISABLEBG is not set
|
||||
# CONFIG_NSH_DISABLESCRIPT is not set
|
||||
# CONFIG_NSH_DISABLE_CAT is not set
|
||||
# CONFIG_NSH_DISABLE_CD is not set
|
||||
# CONFIG_NSH_DISABLE_CP is not set
|
||||
# CONFIG_NSH_DISABLE_DATE is not set
|
||||
# CONFIG_NSH_DISABLE_DF is not set
|
||||
# CONFIG_NSH_DISABLE_ECHO is not set
|
||||
# CONFIG_NSH_DISABLE_ENV is not set
|
||||
# CONFIG_NSH_DISABLE_EXEC is not set
|
||||
# CONFIG_NSH_DISABLE_EXIT is not set
|
||||
# CONFIG_NSH_DISABLE_EXPORT is not set
|
||||
# CONFIG_NSH_DISABLE_FREE is not set
|
||||
# CONFIG_NSH_DISABLE_GET is not set
|
||||
# CONFIG_NSH_DISABLE_HELP is not set
|
||||
# CONFIG_NSH_DISABLE_ITEF is not set
|
||||
# CONFIG_NSH_DISABLE_KILL is not set
|
||||
# CONFIG_NSH_DISABLE_LOOPS is not set
|
||||
# CONFIG_NSH_DISABLE_LS is not set
|
||||
# CONFIG_NSH_DISABLE_MKDIR is not set
|
||||
# CONFIG_NSH_DISABLE_MKFATFS is not set
|
||||
# CONFIG_NSH_DISABLE_MOUNT is not set
|
||||
# CONFIG_NSH_DISABLE_MV is not set
|
||||
# CONFIG_NSH_DISABLE_PRINTF is not set
|
||||
# CONFIG_NSH_DISABLE_PS is not set
|
||||
# CONFIG_NSH_DISABLE_PSSTACKUSAGE is not set
|
||||
# CONFIG_NSH_DISABLE_PWD is not set
|
||||
# CONFIG_NSH_DISABLE_RM is not set
|
||||
# CONFIG_NSH_DISABLE_RMDIR is not set
|
||||
# CONFIG_NSH_DISABLE_SEMICOLON is not set
|
||||
# CONFIG_NSH_DISABLE_SET is not set
|
||||
# CONFIG_NSH_DISABLE_SLEEP is not set
|
||||
# CONFIG_NSH_DISABLE_SOURCE is not set
|
||||
# CONFIG_NSH_DISABLE_TEST is not set
|
||||
# CONFIG_NSH_DISABLE_TIME is not set
|
||||
# CONFIG_NSH_DISABLE_UMOUNT is not set
|
||||
# CONFIG_NSH_DISABLE_UNSET is not set
|
||||
# CONFIG_NSH_DISABLE_USLEEP is not set
|
||||
CONFIG_ARCH="arm"
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR="../../../../boards/x-mav/ap-h743r1/nuttx-config"
|
||||
CONFIG_ARCH_BOARD_CUSTOM_DIR_RELPATH=y
|
||||
CONFIG_ARCH_BOARD_CUSTOM_NAME="px4"
|
||||
CONFIG_ARCH_CHIP="stm32h7"
|
||||
CONFIG_ARCH_CHIP_STM32H743VI=y
|
||||
CONFIG_ARCH_CHIP_STM32H7=y
|
||||
CONFIG_ARCH_INTERRUPTSTACK=768
|
||||
CONFIG_ARCH_STACKDUMP=y
|
||||
CONFIG_ARMV7M_BASEPRI_WAR=y
|
||||
CONFIG_ARMV7M_DCACHE=y
|
||||
CONFIG_ARMV7M_DTCM=y
|
||||
CONFIG_ARMV7M_ICACHE=y
|
||||
CONFIG_ARMV7M_MEMCPY=y
|
||||
CONFIG_ARMV7M_USEBASEPRI=y
|
||||
CONFIG_ARM_MPU_EARLY_RESET=y
|
||||
CONFIG_BOARDCTL_RESET=y
|
||||
CONFIG_BOARD_ASSERT_RESET_VALUE=0
|
||||
CONFIG_BOARD_CRASHDUMP=y
|
||||
CONFIG_BOARD_LOOPSPERMSEC=95150
|
||||
CONFIG_BOARD_RESET_ON_ASSERT=2
|
||||
CONFIG_BUILTIN=y
|
||||
CONFIG_CDCACM=y
|
||||
CONFIG_CDCACM_IFLOWCONTROL=y
|
||||
CONFIG_CDCACM_PRODUCTID=0x0036
|
||||
CONFIG_CDCACM_PRODUCTSTR="X-MAV AP-H743r1"
|
||||
CONFIG_CDCACM_RXBUFSIZE=600
|
||||
CONFIG_CDCACM_TXBUFSIZE=12000
|
||||
CONFIG_CDCACM_VENDORID=0x1B8C
|
||||
CONFIG_CDCACM_VENDORSTR="X-MAV"
|
||||
CONFIG_DEBUG_FULLOPT=y
|
||||
CONFIG_DEBUG_HARDFAULT_ALERT=y
|
||||
CONFIG_DEBUG_MEMFAULT=y
|
||||
CONFIG_DEBUG_SYMBOLS=y
|
||||
CONFIG_DEFAULT_SMALL=y
|
||||
CONFIG_DEV_FIFO_SIZE=0
|
||||
CONFIG_DEV_PIPE_MAXSIZE=1024
|
||||
CONFIG_DEV_PIPE_SIZE=70
|
||||
CONFIG_EXPERIMENTAL=y
|
||||
CONFIG_FAT_DMAMEMORY=y
|
||||
CONFIG_FAT_LCNAMES=y
|
||||
CONFIG_FAT_LFN=y
|
||||
CONFIG_FAT_LFN_ALIAS_HASH=y
|
||||
CONFIG_FDCLONE_STDIO=y
|
||||
CONFIG_FS_BINFS=y
|
||||
CONFIG_FS_CROMFS=y
|
||||
CONFIG_FS_FAT=y
|
||||
CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
CONFIG_GRAN_INTR=y
|
||||
CONFIG_HAVE_CXX=y
|
||||
CONFIG_HAVE_CXXINITIALIZE=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_RESET=y
|
||||
CONFIG_IDLETHREAD_STACKSIZE=750
|
||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||
CONFIG_INIT_STACKSIZE=3194
|
||||
CONFIG_IOB_NBUFFERS=24
|
||||
CONFIG_IOB_NCHAINS=24
|
||||
CONFIG_LIBC_FLOATINGPOINT=y
|
||||
CONFIG_LIBC_LONG_LONG=y
|
||||
CONFIG_LIBC_MAX_EXITFUNS=1
|
||||
CONFIG_LIBC_STRERROR=y
|
||||
CONFIG_MEMSET_64BIT=y
|
||||
CONFIG_MEMSET_OPTSPEED=y
|
||||
CONFIG_MMCSD=y
|
||||
CONFIG_MMCSD_SDIO=y
|
||||
CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y
|
||||
CONFIG_MM_IOB=y
|
||||
CONFIG_MM_REGIONS=4
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BYTE_WRITE=y
|
||||
CONFIG_MTD_PARTITION=y
|
||||
CONFIG_MTD_PROGMEM=y
|
||||
CONFIG_MTD_RAMTRON=y
|
||||
CONFIG_NAME_MAX=40
|
||||
CONFIG_NSH_ARCHINIT=y
|
||||
CONFIG_NSH_ARGCAT=y
|
||||
CONFIG_NSH_BUILTIN_APPS=y
|
||||
CONFIG_NSH_CMDPARMS=y
|
||||
CONFIG_NSH_CROMFSETC=y
|
||||
CONFIG_NSH_LINELEN=128
|
||||
CONFIG_NSH_MAXARGUMENTS=15
|
||||
CONFIG_NSH_NESTDEPTH=8
|
||||
CONFIG_NSH_QUOTE=y
|
||||
CONFIG_NSH_ROMFSETC=y
|
||||
CONFIG_NSH_ROMFSSECTSIZE=128
|
||||
CONFIG_NSH_STRERROR=y
|
||||
CONFIG_NSH_VARS=y
|
||||
CONFIG_OTG_ID_GPIO_DISABLE=y
|
||||
CONFIG_PIPES=y
|
||||
CONFIG_PREALLOC_TIMERS=50
|
||||
CONFIG_PRIORITY_INHERITANCE=y
|
||||
CONFIG_PTHREAD_MUTEX_ROBUST=y
|
||||
CONFIG_PTHREAD_STACK_MIN=512
|
||||
CONFIG_RAMTRON_SETSPEED=y
|
||||
CONFIG_RAM_SIZE=245760
|
||||
CONFIG_RAM_START=0x20010000
|
||||
CONFIG_RAW_BINARY=y
|
||||
CONFIG_READLINE_CMD_HISTORY=y
|
||||
CONFIG_READLINE_TABCOMPLETION=y
|
||||
CONFIG_RTC_DATETIME=y
|
||||
CONFIG_SCHED_HPWORK=y
|
||||
CONFIG_SCHED_HPWORKPRIORITY=249
|
||||
CONFIG_SCHED_HPWORKSTACKSIZE=1280
|
||||
CONFIG_SCHED_INSTRUMENTATION=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_EXTERNAL=y
|
||||
CONFIG_SCHED_INSTRUMENTATION_SWITCH=y
|
||||
CONFIG_SCHED_LPWORK=y
|
||||
CONFIG_SCHED_LPWORKPRIORITY=50
|
||||
CONFIG_SCHED_LPWORKSTACKSIZE=1632
|
||||
CONFIG_SCHED_WAITPID=y
|
||||
CONFIG_SEM_PREALLOCHOLDERS=32
|
||||
CONFIG_SERIAL_IFLOWCONTROL_WATERMARKS=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
CONFIG_SIG_DEFAULT=y
|
||||
CONFIG_SIG_SIGALRM_ACTION=y
|
||||
CONFIG_SIG_SIGUSR1_ACTION=y
|
||||
CONFIG_SIG_SIGUSR2_ACTION=y
|
||||
CONFIG_SIG_SIGWORK=4
|
||||
CONFIG_STACK_COLORATION=y
|
||||
CONFIG_START_DAY=30
|
||||
CONFIG_START_MONTH=11
|
||||
CONFIG_STDIO_BUFFER_SIZE=256
|
||||
CONFIG_STM32H7_ADC1=y
|
||||
CONFIG_STM32H7_ADC2=y
|
||||
CONFIG_STM32H7_ADC3=y
|
||||
CONFIG_STM32H7_BBSRAM=y
|
||||
CONFIG_STM32H7_BBSRAM_FILES=5
|
||||
CONFIG_STM32H7_BDMA=y
|
||||
CONFIG_STM32H7_BKPSRAM=y
|
||||
CONFIG_STM32H7_DMA1=y
|
||||
CONFIG_STM32H7_DMA2=y
|
||||
CONFIG_STM32H7_DMACAPABLE=y
|
||||
CONFIG_STM32H7_FLASH_OVERRIDE_I=y
|
||||
CONFIG_STM32H7_FLOWCONTROL_BROKEN=y
|
||||
CONFIG_STM32H7_I2C1=y
|
||||
CONFIG_STM32H7_I2C2=y
|
||||
CONFIG_STM32H7_I2C4=y
|
||||
CONFIG_STM32H7_I2C_DYNTIMEO=y
|
||||
CONFIG_STM32H7_I2C_DYNTIMEO_STARTSTOP=10
|
||||
CONFIG_STM32H7_OTGFS=y
|
||||
CONFIG_STM32H7_PROGMEM=y
|
||||
CONFIG_STM32H7_RTC=y
|
||||
CONFIG_STM32H7_RTC_HSECLOCK=y
|
||||
CONFIG_STM32H7_RTC_MAGIC_REG=1
|
||||
CONFIG_STM32H7_SAVE_CRASHDUMP=y
|
||||
CONFIG_STM32H7_SDMMC2=y
|
||||
CONFIG_STM32H7_SERIALBRK_BSDCOMPAT=y
|
||||
CONFIG_STM32H7_SERIAL_DISABLE_REORDERING=y
|
||||
CONFIG_STM32H7_SPI1=y
|
||||
CONFIG_STM32H7_SPI1_DMA=y
|
||||
CONFIG_STM32H7_SPI1_DMA_BUFFER=4096
|
||||
CONFIG_STM32H7_SPI3=y
|
||||
CONFIG_STM32H7_SPI4=y
|
||||
CONFIG_STM32H7_SPI4_DMA=y
|
||||
CONFIG_STM32H7_SPI4_DMA_BUFFER=4096
|
||||
CONFIG_STM32H7_SPI_DMATHRESHOLD=8
|
||||
CONFIG_STM32H7_TIM1=y
|
||||
CONFIG_STM32H7_TIM2=y
|
||||
CONFIG_STM32H7_TIM3=y
|
||||
CONFIG_STM32H7_TIM4=y
|
||||
CONFIG_STM32H7_TIM8=y
|
||||
CONFIG_STM32H7_UART4=y
|
||||
CONFIG_STM32H7_UART7=y
|
||||
CONFIG_STM32H7_UART8=y
|
||||
CONFIG_STM32H7_USART1=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
|
||||
CONFIG_STM32H7_USART_SWAP=y
|
||||
CONFIG_SYSTEM_CDCACM=y
|
||||
CONFIG_SYSTEM_NSH=y
|
||||
CONFIG_TASK_NAME_SIZE=24
|
||||
CONFIG_UART4_BAUD=921600
|
||||
CONFIG_UART4_RXBUFSIZE=3000
|
||||
CONFIG_UART4_RXDMA=y
|
||||
CONFIG_UART4_TXBUFSIZE=3000
|
||||
CONFIG_UART4_TXDMA=y
|
||||
CONFIG_UART7_BAUD=57600
|
||||
CONFIG_UART7_RXBUFSIZE=600
|
||||
CONFIG_UART7_TXBUFSIZE=3000
|
||||
CONFIG_UART8_BAUD=57600
|
||||
CONFIG_UART8_RXBUFSIZE=600
|
||||
CONFIG_UART8_SERIAL_CONSOLE=y
|
||||
CONFIG_UART8_TXBUFSIZE=3000
|
||||
CONFIG_USART1_BAUD=57600
|
||||
CONFIG_USART1_RXBUFSIZE=600
|
||||
CONFIG_USART1_RXDMA=y
|
||||
CONFIG_USART1_TXBUFSIZE=1500
|
||||
CONFIG_USART1_TXDMA=y
|
||||
CONFIG_USART2_BAUD=57600
|
||||
CONFIG_USART2_RXBUFSIZE=600
|
||||
CONFIG_USART2_RXDMA=y
|
||||
CONFIG_USART2_TXBUFSIZE=3000
|
||||
CONFIG_USART2_TXDMA=y
|
||||
CONFIG_USART3_BAUD=57600
|
||||
CONFIG_USART3_RXBUFSIZE=180
|
||||
CONFIG_USART3_RXDMA=y
|
||||
CONFIG_USART3_TXBUFSIZE=1500
|
||||
CONFIG_USART3_TXDMA=y
|
||||
CONFIG_USART6_BAUD=57600
|
||||
CONFIG_USART6_RXBUFSIZE=600
|
||||
CONFIG_USART6_RXDMA=y
|
||||
CONFIG_USART6_TXBUFSIZE=1500
|
||||
CONFIG_USART6_TXDMA=y
|
||||
CONFIG_USBDEV=y
|
||||
CONFIG_USBDEV_BUSPOWERED=y
|
||||
CONFIG_USBDEV_MAXPOWER=500
|
||||
CONFIG_USEC_PER_TICK=1000
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_WQUEUE_NOTIFIER=y
|
||||
@@ -0,0 +1,213 @@
|
||||
/****************************************************************************
|
||||
* scripts/script.ld
|
||||
*
|
||||
* Copyright (C) 2016, 2019 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The X-MAV AP-H743-R1 uses an STM32H743VIT6 has 2048Kb of main FLASH memory.
|
||||
* The flash memory is partitioned into a User Flash memory and a System
|
||||
* Flash memory. Each of these memories has two banks:
|
||||
*
|
||||
* 1) User Flash memory:
|
||||
*
|
||||
* Bank 1: Start address 0x0800:0000 to 0x080F:FFFF with 8 sectors, 128Kb each
|
||||
* Bank 2: Start address 0x0810:0000 to 0x081F:FFFF with 8 sectors, 128Kb each
|
||||
*
|
||||
* 2) System Flash memory:
|
||||
*
|
||||
* Bank 1: Start address 0x1FF0:0000 to 0x1FF1:FFFF with 1 x 128Kb sector
|
||||
* Bank 1: Start address 0x1FF4:0000 to 0x1FF5:FFFF with 1 x 128Kb sector
|
||||
*
|
||||
* 3) User option bytes for user configuration, only in Bank 1.
|
||||
*
|
||||
* In the STM32H743VIT6, two different boot spaces can be selected through
|
||||
* the BOOT pin and the boot base address programmed in the BOOT_ADD0 and
|
||||
* BOOT_ADD1 option bytes:
|
||||
*
|
||||
* 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0].
|
||||
* ST programmed value: Flash memory at 0x0800:0000
|
||||
* 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0].
|
||||
* ST programmed value: System bootloader at 0x1FF0:0000
|
||||
*
|
||||
* The AP-H743-R1 has a Button on board, the BOOT0 pin is at ground so by default,
|
||||
* the STM32 will boot to address 0x0800:0000 in FLASH unless the button has been pressed,
|
||||
* then the boot will be from 0x1FF0:0000
|
||||
*
|
||||
* The STM32H743VIT6 also has 1024Kb of data SRAM.
|
||||
* SRAM is split up into several blocks and into three power domains:
|
||||
*
|
||||
* 1) TCM SRAMs are dedicated to the Cortex-M7 and are accessible with
|
||||
* 0 wait states by the Cortex-M7 and by MDMA through AHBS slave bus
|
||||
*
|
||||
* 1.1) 128Kb of DTCM-RAM beginning at address 0x2000:0000
|
||||
*
|
||||
* The DTCM-RAM is organized as 2 x 64Kb DTCM-RAMs on 2 x 32 bit
|
||||
* DTCM ports. The DTCM-RAM could be used for critical real-time
|
||||
* data, such as interrupt service routines or stack / heap memory.
|
||||
* Both DTCM-RAMs can be used in parallel (for load/store operations)
|
||||
* thanks to the Cortex-M7 dual issue capability.
|
||||
*
|
||||
* 1.2) 64Kb of ITCM-RAM beginning at address 0x0000:0000
|
||||
*
|
||||
* This RAM is connected to ITCM 64-bit interface designed for
|
||||
* execution of critical real-times routines by the CPU.
|
||||
*
|
||||
* 2) AXI SRAM (D1 domain) accessible by all system masters except BDMA
|
||||
* through D1 domain AXI bus matrix
|
||||
*
|
||||
* 2.1) 512Kb of SRAM beginning at address 0x2400:0000
|
||||
*
|
||||
* 3) AHB SRAM (D2 domain) accessible by all system masters except BDMA
|
||||
* through D2 domain AHB bus matrix
|
||||
*
|
||||
* 3.1) 128Kb of SRAM1 beginning at address 0x3000:0000
|
||||
* 3.2) 128Kb of SRAM2 beginning at address 0x3002:0000
|
||||
* 3.3) 32Kb of SRAM3 beginning at address 0x3004:0000
|
||||
*
|
||||
* SRAM1 - SRAM3 are one contiguous block: 288Kb at address 0x3000:0000
|
||||
*
|
||||
* 4) AHB SRAM (D3 domain) accessible by most of system masters
|
||||
* through D3 domain AHB bus matrix
|
||||
*
|
||||
* 4.1) 64Kb of SRAM4 beginning at address 0x3800:0000
|
||||
* 4.1) 4Kb of backup RAM beginning at address 0x3880:0000
|
||||
*
|
||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||
* where the code expects to begin execution by jumping to the entry point in
|
||||
* the 0x0800:0000 address range.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
itcm (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
flash (rx) : ORIGIN = 0x08000000, LENGTH = 2048K
|
||||
dtcm1 (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
dtcm2 (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
|
||||
sram (rwx) : ORIGIN = 0x24000000, LENGTH = 512K
|
||||
sram1 (rwx) : ORIGIN = 0x30000000, LENGTH = 128K
|
||||
sram2 (rwx) : ORIGIN = 0x30020000, LENGTH = 128K
|
||||
sram3 (rwx) : ORIGIN = 0x30040000, LENGTH = 32K
|
||||
sram4 (rwx) : ORIGIN = 0x38000000, LENGTH = 64K
|
||||
bbram (rwx) : ORIGIN = 0x38800000, LENGTH = 4K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
/*
|
||||
* Ensure that abort() is present in the final object. The exception handling
|
||||
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
|
||||
*/
|
||||
EXTERN(abort)
|
||||
EXTERN(_bootdelay_signature)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
. = ALIGN(32);
|
||||
/*
|
||||
This signature provides the bootloader with a way to delay booting
|
||||
*/
|
||||
_bootdelay_signature = ABSOLUTE(.);
|
||||
FILL(0xffecc2925d7d05c5)
|
||||
. += 8;
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
|
||||
} > flash
|
||||
|
||||
/*
|
||||
* Init functions (static constructors and the like)
|
||||
*/
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(.init_array .init_array.*))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > flash
|
||||
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > flash
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > flash
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
} > sram AT > flash
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > sram
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
/****************************************************************************
|
||||
* scripts/script.ld
|
||||
*
|
||||
* Copyright (C) 2020 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* The board uses an STM32H743VIT6 and has 2048Kb of main FLASH memory.
|
||||
* The flash memory is partitioned into a User Flash memory and a System
|
||||
* Flash memory. Each of these memories has two banks:
|
||||
*
|
||||
* 1) User Flash memory:
|
||||
*
|
||||
* Bank 1: Start address 0x0800:0000 to 0x080F:FFFF with 8 sectors, 128Kb each
|
||||
* Bank 2: Start address 0x0810:0000 to 0x081F:FFFF with 8 sectors, 128Kb each
|
||||
*
|
||||
* 2) System Flash memory:
|
||||
*
|
||||
* Bank 1: Start address 0x1FF0:0000 to 0x1FF1:FFFF with 1 x 128Kb sector
|
||||
* Bank 1: Start address 0x1FF4:0000 to 0x1FF5:FFFF with 1 x 128Kb sector
|
||||
*
|
||||
* 3) User option bytes for user configuration, only in Bank 1.
|
||||
*
|
||||
* In the STM32H743VIT6, two different boot spaces can be selected through
|
||||
* the BOOT pin and the boot base address programmed in the BOOT_ADD0 and
|
||||
* BOOT_ADD1 option bytes:
|
||||
*
|
||||
* 1) BOOT=0: Boot address defined by user option byte BOOT_ADD0[15:0].
|
||||
* ST programmed value: Flash memory at 0x0800:0000
|
||||
* 2) BOOT=1: Boot address defined by user option byte BOOT_ADD1[15:0].
|
||||
* ST programmed value: System bootloader at 0x1FF0:0000
|
||||
*
|
||||
* There's a button on board, the BOOT0 pin is at ground so by default,
|
||||
* the STM32 will boot to address 0x0800:0000 in FLASH unless the switch is
|
||||
* drepresed, then the boot will be from 0x1FF0:0000
|
||||
*
|
||||
* The STM32H743VIT6 also has 1024Kb of data SRAM.
|
||||
* SRAM is split up into several blocks and into three power domains:
|
||||
*
|
||||
* 1) TCM SRAMs are dedicated to the Cortex-M7 and are accessible with
|
||||
* 0 wait states by the Cortex-M7 and by MDMA through AHBS slave bus
|
||||
*
|
||||
* 1.1) 128Kb of DTCM-RAM beginning at address 0x2000:0000
|
||||
*
|
||||
* The DTCM-RAM is organized as 2 x 64Kb DTCM-RAMs on 2 x 32 bit
|
||||
* DTCM ports. The DTCM-RAM could be used for critical real-time
|
||||
* data, such as interrupt service routines or stack / heap memory.
|
||||
* Both DTCM-RAMs can be used in parallel (for load/store operations)
|
||||
* thanks to the Cortex-M7 dual issue capability.
|
||||
*
|
||||
* 1.2) 64Kb of ITCM-RAM beginning at address 0x0000:0000
|
||||
*
|
||||
* This RAM is connected to ITCM 64-bit interface designed for
|
||||
* execution of critical real-times routines by the CPU.
|
||||
*
|
||||
* 2) AXI SRAM (D1 domain) accessible by all system masters except BDMA
|
||||
* through D1 domain AXI bus matrix
|
||||
*
|
||||
* 2.1) 512Kb of SRAM beginning at address 0x2400:0000
|
||||
*
|
||||
* 3) AHB SRAM (D2 domain) accessible by all system masters except BDMA
|
||||
* through D2 domain AHB bus matrix
|
||||
*
|
||||
* 3.1) 128Kb of SRAM1 beginning at address 0x3000:0000
|
||||
* 3.2) 128Kb of SRAM2 beginning at address 0x3002:0000
|
||||
* 3.3) 32Kb of SRAM3 beginning at address 0x3004:0000
|
||||
*
|
||||
* SRAM1 - SRAM3 are one contiguous block: 288Kb at address 0x3000:0000
|
||||
*
|
||||
* 4) AHB SRAM (D3 domain) accessible by most of system masters
|
||||
* through D3 domain AHB bus matrix
|
||||
*
|
||||
* 4.1) 64Kb of SRAM4 beginning at address 0x3800:0000
|
||||
* 4.1) 4Kb of backup RAM beginning at address 0x3880:0000
|
||||
*
|
||||
* When booting from FLASH, FLASH memory is aliased to address 0x0000:0000
|
||||
* where the code expects to begin execution by jumping to the entry point in
|
||||
* the 0x0800:0000 address range.
|
||||
*/
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ITCM_RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 64K
|
||||
FLASH (rx) : ORIGIN = 0x08020000, LENGTH = 1920K
|
||||
|
||||
DTCM1_RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
DTCM2_RAM (rwx) : ORIGIN = 0x20010000, LENGTH = 64K
|
||||
AXI_SRAM (rwx) : ORIGIN = 0x24000000, LENGTH = 512K /* D1 domain AXI bus */
|
||||
SRAM1 (rwx) : ORIGIN = 0x30000000, LENGTH = 128K /* D2 domain AHB bus */
|
||||
SRAM2 (rwx) : ORIGIN = 0x30020000, LENGTH = 128K /* D2 domain AHB bus */
|
||||
SRAM3 (rwx) : ORIGIN = 0x30040000, LENGTH = 32K /* D2 domain AHB bus */
|
||||
SRAM4 (rwx) : ORIGIN = 0x38000000, LENGTH = 64K /* D3 domain */
|
||||
BKPRAM (rwx) : ORIGIN = 0x38800000, LENGTH = 4K
|
||||
}
|
||||
|
||||
OUTPUT_ARCH(arm)
|
||||
EXTERN(_vectors)
|
||||
ENTRY(_stext)
|
||||
|
||||
/*
|
||||
* Ensure that abort() is present in the final object. The exception handling
|
||||
* code pulled in by libgcc.a requires it (and that code cannot be easily avoided).
|
||||
*/
|
||||
EXTERN(abort)
|
||||
EXTERN(_bootdelay_signature)
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text : {
|
||||
_stext = ABSOLUTE(.);
|
||||
*(.vectors)
|
||||
. = ALIGN(32);
|
||||
/*
|
||||
This signature provides the bootloader with a way to delay booting
|
||||
*/
|
||||
_bootdelay_signature = ABSOLUTE(.);
|
||||
FILL(0xffecc2925d7d05c5)
|
||||
. += 8;
|
||||
*(.text .text.*)
|
||||
*(.fixup)
|
||||
*(.gnu.warning)
|
||||
*(.rodata .rodata.*)
|
||||
*(.gnu.linkonce.t.*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
*(.got)
|
||||
*(.gcc_except_table)
|
||||
*(.gnu.linkonce.r.*)
|
||||
_etext = ABSOLUTE(.);
|
||||
|
||||
} > FLASH
|
||||
|
||||
/*
|
||||
* Init functions (static constructors and the like)
|
||||
*/
|
||||
.init_section : {
|
||||
_sinit = ABSOLUTE(.);
|
||||
KEEP(*(.init_array .init_array.*))
|
||||
_einit = ABSOLUTE(.);
|
||||
} > FLASH
|
||||
|
||||
|
||||
.ARM.extab : {
|
||||
*(.ARM.extab*)
|
||||
} > FLASH
|
||||
|
||||
__exidx_start = ABSOLUTE(.);
|
||||
.ARM.exidx : {
|
||||
*(.ARM.exidx*)
|
||||
} > FLASH
|
||||
__exidx_end = ABSOLUTE(.);
|
||||
|
||||
_eronly = ABSOLUTE(.);
|
||||
|
||||
.data : {
|
||||
_sdata = ABSOLUTE(.);
|
||||
*(.data .data.*)
|
||||
*(.gnu.linkonce.d.*)
|
||||
CONSTRUCTORS
|
||||
_edata = ABSOLUTE(.);
|
||||
|
||||
/* Pad out last section as the STM32H7 Flash write size is 256 bits. 32 bytes */
|
||||
. = ALIGN(16);
|
||||
FILL(0xffff)
|
||||
. += 16;
|
||||
} > AXI_SRAM AT > FLASH = 0xffff
|
||||
|
||||
.bss : {
|
||||
_sbss = ABSOLUTE(.);
|
||||
*(.bss .bss.*)
|
||||
*(.gnu.linkonce.b.*)
|
||||
*(COMMON)
|
||||
. = ALIGN(4);
|
||||
_ebss = ABSOLUTE(.);
|
||||
} > AXI_SRAM
|
||||
|
||||
/* Emit the the D3 power domain section for locating BDMA data */
|
||||
|
||||
.sram4_reserve (NOLOAD) :
|
||||
{
|
||||
*(.sram4)
|
||||
. = ALIGN(4);
|
||||
_sram4_heap_start = ABSOLUTE(.);
|
||||
} > SRAM4
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
.stab.excl 0 : { *(.stab.excl) }
|
||||
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||
.stab.index 0 : { *(.stab.index) }
|
||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||
.comment 0 : { *(.comment) }
|
||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||
.debug_info 0 : { *(.debug_info) }
|
||||
.debug_line 0 : { *(.debug_line) }
|
||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||
.debug_aranges 0 : { *(.debug_aranges) }
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2025 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE modules__pwm_voltage_apply
|
||||
MAIN pwm_voltage_apply
|
||||
|
||||
SRCS
|
||||
pwm_voltage.cpp
|
||||
DEPENDS
|
||||
px4_work_queue
|
||||
)
|
||||
@@ -0,0 +1,43 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* Control PWM output voltage
|
||||
*
|
||||
* @value 0 3.3V
|
||||
* @value 1 5.0V
|
||||
*
|
||||
* @reboot_required true
|
||||
* @group PWM Outputs
|
||||
*/
|
||||
PARAM_DEFINE_INT32(PWM_VOLT_SEL, 0);
|
||||
@@ -0,0 +1,56 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2025 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <px4_platform_common/getopt.h>
|
||||
#include <px4_platform_common/module_params.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
extern "C" int pwm_voltage_apply_main(int argc, char *argv[])
|
||||
{
|
||||
int32_t pwm_volt_sel = 0;
|
||||
|
||||
param_get(param_find("PWM_VOLT_SEL"), &pwm_volt_sel);
|
||||
|
||||
if (pwm_volt_sel != 0) {
|
||||
PWM_5V_VOLT_SEL(true);
|
||||
|
||||
} else {
|
||||
PWM_5V_VOLT_SEL(false);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
CONFIG_MODULES_FLIGHT_MODE_MANAGER=n
|
||||
CONFIG_MODULES_FW_ATT_CONTROL=n
|
||||
CONFIG_MODULES_FW_AUTOTUNE_ATTITUDE_CONTROL=n
|
||||
CONFIG_MODULES_FW_LATERAL_LONGITUDINAL_CONTROL=n
|
||||
CONFIG_MODULES_FW_MODE_MANAGER=n
|
||||
CONFIG_MODULES_FW_RATE_CONTROL=n
|
||||
CONFIG_MODULES_MC_ATT_CONTROL=n
|
||||
CONFIG_MODULES_MC_AUTOTUNE_ATTITUDE_CONTROL=n
|
||||
CONFIG_MODULES_MC_HOVER_THRUST_ESTIMATOR=n
|
||||
CONFIG_MODULES_MC_POS_CONTROL=n
|
||||
CONFIG_MODULES_MC_RATE_CONTROL=n
|
||||
CONFIG_MODULES_VTOL_ATT_CONTROL=n
|
||||
CONFIG_MODULES_ROVER_ACKERMANN=y
|
||||
CONFIG_MODULES_ROVER_DIFFERENTIAL=y
|
||||
CONFIG_MODULES_ROVER_MECANUM=y
|
||||
@@ -0,0 +1,70 @@
|
||||
############################################################################
|
||||
#
|
||||
# Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
# 3. Neither the name PX4 nor the names of its contributors may be
|
||||
# used to endorse or promote products derived from this software
|
||||
# without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
############################################################################
|
||||
if("${PX4_BOARD_LABEL}" STREQUAL "bootloader")
|
||||
add_library(drivers_board
|
||||
bootloader_main.c
|
||||
usb.c
|
||||
)
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
bootloader
|
||||
)
|
||||
target_include_directories(drivers_board PRIVATE ${PX4_SOURCE_DIR}/platforms/nuttx/src/bootloader/common)
|
||||
|
||||
else()
|
||||
add_library(drivers_board
|
||||
i2c.cpp
|
||||
init.c
|
||||
led.c
|
||||
sdio.c
|
||||
spi.cpp
|
||||
timer_config.cpp
|
||||
usb.c
|
||||
mtd.cpp
|
||||
can.c
|
||||
)
|
||||
# add_dependencies(drivers_board arch_board_hw_info)
|
||||
|
||||
target_link_libraries(drivers_board
|
||||
PRIVATE
|
||||
arch_io_pins
|
||||
arch_spi
|
||||
arch_board_hw_info
|
||||
drivers__led
|
||||
nuttx_arch
|
||||
nuttx_drivers
|
||||
px4_layer
|
||||
)
|
||||
endif()
|
||||
@@ -0,0 +1,226 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file board_config.h
|
||||
*
|
||||
* Board internal definitions
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/****************************************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************************************/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stm32_gpio.h>
|
||||
|
||||
/****************************************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************************************/
|
||||
|
||||
/* PX4IO connection configuration */
|
||||
#define BOARD_USES_PX4IO_VERSION 2
|
||||
#define PX4IO_SERIAL_DEVICE "/dev/ttyS4"
|
||||
#define PX4IO_SERIAL_TX_GPIO GPIO_USART6_TX
|
||||
#define PX4IO_SERIAL_RX_GPIO GPIO_USART6_RX
|
||||
#define PX4IO_SERIAL_BASE STM32_USART6_BASE
|
||||
#define PX4IO_SERIAL_VECTOR STM32_IRQ_USART6
|
||||
#define PX4IO_SERIAL_TX_DMAMAP DMAMAP_USART6_TX
|
||||
#define PX4IO_SERIAL_RX_DMAMAP DMAMAP_USART6_RX
|
||||
#define PX4IO_SERIAL_RCC_REG STM32_RCC_APB2ENR
|
||||
#define PX4IO_SERIAL_RCC_EN RCC_APB2ENR_USART6EN
|
||||
#define PX4IO_SERIAL_CLOCK STM32_PCLK2_FREQUENCY
|
||||
#define PX4IO_SERIAL_BITRATE 1500000 /* 1.5Mbps -> max rate for IO */
|
||||
|
||||
/* LEDs are driven with push open drain to support Anode to 5V or 3.3V */
|
||||
|
||||
# define GPIO_nLED_RED /* PD15 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN15)
|
||||
# define GPIO_nLED_GREEN /* PD11 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN11)
|
||||
# define GPIO_nLED_BLUE /* PD10 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN10)
|
||||
|
||||
# define BOARD_HAS_CONTROL_STATUS_LEDS 1
|
||||
# define BOARD_OVERLOAD_LED LED_RED
|
||||
# define BOARD_ARMED_STATE_LED LED_BLUE
|
||||
|
||||
/*
|
||||
* ADC channels
|
||||
*
|
||||
* These are the channel numbers of the ADCs of the microcontroller that
|
||||
* can be used by the Px4 Firmware in the adc driver
|
||||
*/
|
||||
|
||||
/* ADC defines to be used in sensors.cpp to read from a particular channel */
|
||||
|
||||
#define SYSTEM_ADC_BASE STM32_ADC1_BASE
|
||||
|
||||
#define ADC12_CH(n) (n)
|
||||
#define ADC3_CH(n) (n)
|
||||
|
||||
#define ANALOG_PC3 (GPIO_ANALOG|GPIO_PORTC|GPIO_PIN3)
|
||||
|
||||
#define PX4_ADC_GPIO \
|
||||
/* PC4 */ GPIO_ADC12_INP4, \
|
||||
/* PC5 */ GPIO_ADC12_INP8
|
||||
|
||||
/* Define GPIO pins used as ADC N.B. Channel numbers must match below */
|
||||
/* Define Channel numbers must match above GPIO pin IN(n)*/
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL ADC12_CH(4)
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL ADC12_CH(8)
|
||||
|
||||
#define ADC_CHANNELS \
|
||||
((1 << ADC_BATTERY_VOLTAGE_CHANNEL) | \
|
||||
(1 << ADC_BATTERY_CURRENT_CHANNEL))
|
||||
|
||||
#define BOARD_ADC_OPEN_CIRCUIT_V (1.6f)
|
||||
|
||||
#define BOARD_HAS_STATIC_MANIFEST 1
|
||||
|
||||
#define UAVCAN_NUM_IFACES_RUNTIME 1
|
||||
|
||||
/* PWM
|
||||
*/
|
||||
#define DIRECT_PWM_OUTPUT_CHANNELS 7
|
||||
|
||||
#define BOARD_HAS_PWM DIRECT_PWM_OUTPUT_CHANNELS
|
||||
|
||||
/* PWM Power */
|
||||
#define GPIO_PWM_VOLT_SEL /* PA8 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN8)
|
||||
#define PWM_5V_VOLT_SEL(on_true) px4_arch_gpiowrite(GPIO_PWM_VOLT_SEL, (on_true))
|
||||
|
||||
/* Tone alarm output */
|
||||
#define TONE_ALARM_TIMER 5 /* Timer 5 */
|
||||
#define TONE_ALARM_CHANNEL 4 /* PA3 GPIO_TIM5_CH4 */
|
||||
#define GPIO_BUZZER_1 /* PA3 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTA|GPIO_PIN3)
|
||||
|
||||
#define GPIO_TONE_ALARM_IDLE GPIO_BUZZER_1
|
||||
#define GPIO_TONE_ALARM GPIO_BUZZER_1
|
||||
|
||||
/* USB OTG FS
|
||||
*
|
||||
* PE15 OTG_FS_VBUS VBUS sensing
|
||||
*/
|
||||
#define GPIO_OTGFS_VBUS /* PE15 */ (GPIO_INPUT|GPIO_PULLDOWN|GPIO_SPEED_100MHz|GPIO_PORTE|GPIO_PIN15)
|
||||
#define BOARD_ADC_USB_CONNECTED (px4_arch_gpioread(GPIO_OTGFS_VBUS))
|
||||
|
||||
/* High-resolution timer */
|
||||
#define HRT_TIMER 8 /* use timer1 for the HRT */
|
||||
#define HRT_TIMER_CHANNEL 1 /* use capture/compare channel 1 */
|
||||
|
||||
/* RC Serial port */
|
||||
#define RC_SERIAL_PORT "/dev/ttyS4"
|
||||
#define BOARD_SUPPORTS_RC_SERIAL_PORT_OUTPUT
|
||||
|
||||
/* SD card bringup does not work if performed on the IDLE thread because it
|
||||
* will cause waiting. Use either:
|
||||
*
|
||||
* CONFIG_LIB_BOARDCTL=y, OR
|
||||
* CONFIG_BOARD_INITIALIZE=y && CONFIG_BOARD_INITTHREAD=y
|
||||
*/
|
||||
#define SDIO_SLOTNO 0 /* Only one slot */
|
||||
#define SDIO_MINOR 0
|
||||
#if defined(CONFIG_BOARD_INITIALIZE) && !defined(CONFIG_LIB_BOARDCTL) && \
|
||||
!defined(CONFIG_BOARD_INITTHREAD)
|
||||
# warning SDIO initialization cannot be perfomed on the IDLE thread
|
||||
#endif
|
||||
|
||||
/* This board provides a DMA pool and APIs */
|
||||
#define BOARD_DMA_ALLOC_POOL_SIZE 5120
|
||||
|
||||
/* This board provides the board_on_reset interface */
|
||||
#define BOARD_HAS_ON_RESET 1
|
||||
|
||||
#define PX4_GPIO_INIT_LIST { \
|
||||
GPIO_CAN1_TX,\
|
||||
GPIO_CAN1_RX,\
|
||||
GPIO_CAN2_TX,\
|
||||
GPIO_CAN2_RX,\
|
||||
PX4_ADC_GPIO,\
|
||||
GPIO_TONE_ALARM_IDLE,\
|
||||
GPIO_PWM_VOLT_SEL\
|
||||
}
|
||||
|
||||
#define BOARD_ENABLE_CONSOLE_BUFFER
|
||||
|
||||
#define BOARD_NUM_IO_TIMERS 5
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************************************/
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public data
|
||||
****************************************************************************************************/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/****************************************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_sdio_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize SDIO-based MMC/SD card support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_sdio_initialize(void);
|
||||
|
||||
/****************************************************************************************************
|
||||
* Name: stm32_spiinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to configure SPI chip select GPIO pins for the board.
|
||||
*
|
||||
****************************************************************************************************/
|
||||
|
||||
extern void stm32_spiinitialize(void);
|
||||
|
||||
extern void stm32_usbinitialize(void);
|
||||
|
||||
extern void board_peripheral_reset(int ms);
|
||||
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
__END_DECLS
|
||||
@@ -0,0 +1,75 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file bootloader_main.c
|
||||
*
|
||||
* FMU-specific early startup code for bootloader
|
||||
*/
|
||||
|
||||
#include "board_config.h"
|
||||
#include "bl.h"
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <chip.h>
|
||||
#include <stm32_uart.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "arm_internal.h"
|
||||
#include <px4_platform_common/init.h>
|
||||
|
||||
extern int sercon_main(int c, char **argv);
|
||||
|
||||
__EXPORT void board_on_reset(int status) {}
|
||||
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
/* configure USB interfaces */
|
||||
stm32_usbinitialize();
|
||||
}
|
||||
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void board_late_initialize(void)
|
||||
{
|
||||
sercon_main(0, NULL);
|
||||
}
|
||||
|
||||
extern void sys_tick_handler(void);
|
||||
void board_timerhook(void)
|
||||
{
|
||||
sys_tick_handler();
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file px4fmu_can.c
|
||||
*
|
||||
* Board-specific CAN functions.
|
||||
*/
|
||||
|
||||
#if !defined(CONFIG_CAN)
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
|
||||
__EXPORT
|
||||
uint16_t board_get_can_interfaces(void)
|
||||
{
|
||||
uint16_t enabled_interfaces = 0x3;
|
||||
|
||||
enabled_interfaces &= ~(1 << 1);
|
||||
|
||||
return enabled_interfaces;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <errno.h>
|
||||
#include <debug.h>
|
||||
|
||||
#include <nuttx/can/can.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "arm_internal.h"
|
||||
|
||||
#include "chip.h"
|
||||
#include "stm32_can.h"
|
||||
#include "board_config.h"
|
||||
|
||||
/************************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
/* Configuration ********************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2)
|
||||
# warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1."
|
||||
# undef CONFIG_STM32_CAN2
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_STM32_CAN1
|
||||
# define CAN_PORT 1
|
||||
#else
|
||||
# define CAN_PORT 2
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Private Functions
|
||||
************************************************************************************/
|
||||
|
||||
/************************************************************************************
|
||||
* Public Functions
|
||||
************************************************************************************/
|
||||
int can_devinit(void);
|
||||
|
||||
/************************************************************************************
|
||||
* Name: can_devinit
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following interface to work with
|
||||
* examples/can.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
int can_devinit(void)
|
||||
{
|
||||
static bool initialized = false;
|
||||
struct can_dev_s *can;
|
||||
int ret;
|
||||
|
||||
/* Check if we have already initialized */
|
||||
|
||||
if (!initialized) {
|
||||
/* Call stm32_caninitialize() to get an instance of the CAN interface */
|
||||
|
||||
can = stm32_caninitialize(CAN_PORT);
|
||||
|
||||
if (can == NULL) {
|
||||
canerr("ERROR: Failed to get CAN interface\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Register the CAN driver at "/dev/can0" */
|
||||
|
||||
ret = can_register("/dev/can0", can);
|
||||
|
||||
if (ret < 0) {
|
||||
canerr("ERROR: can_register failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Now we are initialized */
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* CONFIG_CAN */
|
||||
@@ -0,0 +1,135 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
/****************************************************************************
|
||||
* 10-8--2016:
|
||||
* To simplify the ripple effect on the tools, we will be using
|
||||
* /dev/serial/by-id/<asterisk>PX4<asterisk> to locate PX4 devices. Therefore
|
||||
* moving forward all Bootloaders must contain the prefix "PX4 BL "
|
||||
* in the USBDEVICESTRING
|
||||
* This Change will be made in an upcoming BL release
|
||||
****************************************************************************/
|
||||
/*
|
||||
* Define usage to configure a bootloader
|
||||
*
|
||||
*
|
||||
* Constant example Usage
|
||||
* APP_LOAD_ADDRESS 0x08004000 - The address in Linker Script, where the app fw is org-ed
|
||||
* BOOTLOADER_DELAY 5000 - Ms to wait while under USB pwr or bootloader request
|
||||
* BOARD_FMUV2
|
||||
* INTERFACE_USB 1 - (Optional) Scan and use the USB interface for bootloading
|
||||
* INTERFACE_USART 1 - (Optional) Scan and use the Serial interface for bootloading
|
||||
* USBDEVICESTRING "PX4 BL FMU v2.x" - USB id string
|
||||
* USBPRODUCTID 0x0011 - PID Should match defconfig
|
||||
* BOOT_DELAY_ADDRESS 0x000001a0 - (Optional) From the linker script from Linker Script to get a custom
|
||||
* delay provided by an APP FW
|
||||
* BOARD_TYPE 9 - Must match .prototype boad_id
|
||||
* _FLASH_KBYTES (*(uint16_t *)0x1fff7a22) - Run time flash size detection
|
||||
* BOARD_FLASH_SECTORS ((_FLASH_KBYTES == 0x400) ? 11 : 23) - Run time determine the physical last sector
|
||||
* BOARD_FLASH_SECTORS 11 - Hard coded zero based last sector
|
||||
* BOARD_FLASH_SIZE (_FLASH_KBYTES*1024)- Total Flash size of device, determined at run time.
|
||||
* (1024 * 1024) - Hard coded Total Flash of device - The bootloader and app reserved will be deducted
|
||||
* programmatically
|
||||
*
|
||||
* BOARD_FIRST_FLASH_SECTOR_TO_ERASE 2 - Optional sectors index in the flash_sectors table (F4 only), to begin erasing.
|
||||
* This is to allow sectors to be reserved for app fw usage. That will NOT be erased
|
||||
* during a FW upgrade.
|
||||
* The default is 0, and selects the first sector to be erased, as the 0th entry in the
|
||||
* flash_sectors table. Which is the second physical sector of FLASH in the device.
|
||||
* The first physical sector of FLASH is used by the bootloader, and is not defined
|
||||
* in the table.
|
||||
*
|
||||
* APP_RESERVATION_SIZE (BOARD_FIRST_FLASH_SECTOR_TO_ERASE * 16 * 1024) - Number of bytes reserved by the APP FW. This number plus
|
||||
* BOOTLOADER_RESERVATION_SIZE will be deducted from
|
||||
* BOARD_FLASH_SIZE to determine the size of the App FW
|
||||
* and hence the address space of FLASH to erase and program.
|
||||
* USBMFGSTRING "PX4 AP" - Optional USB MFG string (default is '3D Robotics' if not defined.)
|
||||
* SERIAL_BREAK_DETECT_DISABLED - Optional prevent break selection on Serial port from entering or staying in BL
|
||||
*
|
||||
* * Other defines are somewhat self explanatory.
|
||||
*/
|
||||
|
||||
/* Boot device selection list*/
|
||||
#define USB0_DEV 0x01
|
||||
#define SERIAL0_DEV 0x02
|
||||
#define SERIAL1_DEV 0x04
|
||||
|
||||
#define APP_LOAD_ADDRESS 0x08020000
|
||||
#define BOOTLOADER_DELAY 5000
|
||||
#define INTERFACE_USB 1
|
||||
#define INTERFACE_USB_CONFIG "/dev/ttyACM0"
|
||||
#define BOARD_VBUS MK_GPIO_INPUT(GPIO_OTGFS_VBUS)
|
||||
|
||||
//#define USE_VBUS_PULL_DOWN
|
||||
// #define INTERFACE_USART 6
|
||||
#define INTERFACE_USART_CONFIG "/dev/ttyS5,57600"
|
||||
#define BOOT_DELAY_ADDRESS 0x000001a0
|
||||
#define BOARD_TYPE 1203
|
||||
#define _FLASH_KBYTES (*(uint32_t *)0x1FF1E880)
|
||||
#define BOARD_FLASH_SECTORS (15)
|
||||
#define BOARD_FLASH_SIZE (_FLASH_KBYTES * 1024)
|
||||
|
||||
#define OSC_FREQ 8
|
||||
|
||||
#define BOARD_PIN_LED_ACTIVITY GPIO_nLED_BLUE // BLUE
|
||||
#define BOARD_PIN_LED_BOOTLOADER GPIO_nLED_RED // RED
|
||||
#define BOARD_LED_ON 1
|
||||
#define BOARD_LED_OFF 0
|
||||
|
||||
#define SERIAL_BREAK_DETECT_DISABLED 1
|
||||
|
||||
#if !defined(ARCH_SN_MAX_LENGTH)
|
||||
# define ARCH_SN_MAX_LENGTH 12
|
||||
#endif
|
||||
|
||||
#if !defined(APP_RESERVATION_SIZE)
|
||||
# define APP_RESERVATION_SIZE 0
|
||||
#endif
|
||||
|
||||
#if !defined(BOARD_FIRST_FLASH_SECTOR_TO_ERASE)
|
||||
# define BOARD_FIRST_FLASH_SECTOR_TO_ERASE 1
|
||||
#endif
|
||||
|
||||
#if !defined(USB_DATA_ALIGN)
|
||||
# define USB_DATA_ALIGN
|
||||
#endif
|
||||
|
||||
#ifndef BOOT_DEVICES_SELECTION
|
||||
# define BOOT_DEVICES_SELECTION USB0_DEV|SERIAL0_DEV|SERIAL1_DEV
|
||||
#endif
|
||||
|
||||
#ifndef BOOT_DEVICES_FILTER_ONUSB
|
||||
# define BOOT_DEVICES_FILTER_ONUSB USB0_DEV|SERIAL0_DEV|SERIAL1_DEV
|
||||
#endif
|
||||
@@ -0,0 +1,40 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/i2c_hw_description.h>
|
||||
|
||||
constexpr px4_i2c_bus_t px4_i2c_buses[I2C_BUS_MAX_BUS_ITEMS] = {
|
||||
initI2CBusInternal(1),
|
||||
initI2CBusExternal(2),
|
||||
initI2CBusExternal(4),
|
||||
};
|
||||
@@ -0,0 +1,211 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file init.c
|
||||
*
|
||||
* FMU-specific early startup code. This file implements the
|
||||
* board_app_initialize() function that is called early by nsh during startup.
|
||||
*
|
||||
* Code here is run before the rcS script is invoked; it should start required
|
||||
* subsystems and perform board-specific initialisation.
|
||||
*/
|
||||
|
||||
#include "board_config.h"
|
||||
|
||||
#include <syslog.h>
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/board.h>
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
#include <arch/board/board.h>
|
||||
#include "arm_internal.h"
|
||||
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <drivers/drv_board_led.h>
|
||||
#include <systemlib/px4_macros.h>
|
||||
#include <px4_arch/io_timer.h>
|
||||
#include <px4_platform_common/init.h>
|
||||
#include <px4_platform/gpio.h>
|
||||
#include <px4_platform/board_dma_alloc.h>
|
||||
#include <px4_platform/board_determine_hw_info.h>
|
||||
|
||||
#include <mpu.h>
|
||||
|
||||
# if defined(FLASH_BASED_PARAMS)
|
||||
# include <parameters/flashparams/flashfs.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
__END_DECLS
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_peripheral_reset
|
||||
*
|
||||
* Description:
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void board_peripheral_reset(int ms)
|
||||
{
|
||||
UNUSED(ms);
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: board_on_reset
|
||||
*
|
||||
* Description:
|
||||
* Optionally provided function called on entry to board_system_reset
|
||||
* It should perform any house keeping prior to the rest.
|
||||
*
|
||||
* status - 1 if resetting to boot loader
|
||||
* 0 if just resetting
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void board_on_reset(int status)
|
||||
{
|
||||
for (int i = 0; i < DIRECT_PWM_OUTPUT_CHANNELS; ++i) {
|
||||
px4_arch_configgpio(PX4_MAKE_GPIO_INPUT(io_timer_channel_get_as_pwm_input(i)));
|
||||
}
|
||||
|
||||
/*
|
||||
* On resets invoked from system (not boot) ensure we establish a low
|
||||
* output state on PWM pins to disarm the ESC and prevent the reset from potentially
|
||||
* spinning up the motors.
|
||||
*/
|
||||
if (status >= 0) {
|
||||
up_mdelay(100);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_boardinitialize
|
||||
*
|
||||
* Description:
|
||||
* All STM32 architectures must provide the following entry point. This entry point
|
||||
* is called early in the initialization -- after all memory has been configured
|
||||
* and mapped but before any devices have been initialized.
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
/* Reset PWM first thing */
|
||||
board_on_reset(-1);
|
||||
|
||||
/* configure LEDs */
|
||||
board_autoled_initialize();
|
||||
|
||||
/* configure pins */
|
||||
const uint32_t gpio[] = PX4_GPIO_INIT_LIST;
|
||||
px4_gpio_init(gpio, arraySize(gpio));
|
||||
|
||||
/* configure SPI interfaces */
|
||||
stm32_spiinitialize();
|
||||
|
||||
/* configure USB interfaces */
|
||||
stm32_usbinitialize();
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: board_app_initialize
|
||||
*
|
||||
* Description:
|
||||
* Perform application specific initialization. This function is never
|
||||
* called directly from application code, but only indirectly via the
|
||||
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
|
||||
*
|
||||
* Input Parameters:
|
||||
* arg - The boardctl() argument is passed to the board_app_initialize()
|
||||
* implementation without modification. The argument has no
|
||||
* meaning to NuttX;
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero (OK) is returned on success; a negated errno value is returned on
|
||||
* any failure to indicate the nature of the failure.
|
||||
*
|
||||
****************************************************************************/
|
||||
__EXPORT int board_app_initialize(uintptr_t arg)
|
||||
{
|
||||
/* Need hrt running before using the ADC */
|
||||
px4_platform_init();
|
||||
|
||||
/* configure the DMA allocator */
|
||||
if (board_dma_alloc_init() < 0) {
|
||||
syslog(LOG_ERR, "[boot] DMA alloc FAILED\n");
|
||||
}
|
||||
|
||||
/* initial LED state */
|
||||
drv_led_start();
|
||||
led_off(LED_RED);
|
||||
led_off(LED_BLUE);
|
||||
|
||||
if (board_hardfault_init(2, true) != 0) {
|
||||
led_on(LED_BLUE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MMCSD
|
||||
int ret = stm32_sdio_initialize();
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_BLUE);
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// TODO:internal flash store parameters
|
||||
#if defined(FLASH_BASED_PARAMS)
|
||||
static sector_descriptor_t params_sector_map[] = {
|
||||
{15, 128 * 1024, 0x081E0000},
|
||||
{0, 0, 0},
|
||||
};
|
||||
|
||||
/* Initialize the flashfs layer to use heap allocated memory */
|
||||
int result = parameter_flashfs_init(params_sector_map, NULL, 0);
|
||||
|
||||
if (result != OK) {
|
||||
syslog(LOG_ERR, "[boot] FAILED to init params in FLASH %d\n", result);
|
||||
led_on(LED_RED);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Configure the HW based on the manifest */
|
||||
px4_platform_configure();
|
||||
|
||||
return OK;
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file led.c
|
||||
*
|
||||
* LED backend.
|
||||
*/
|
||||
|
||||
#include <px4_platform_common/px4_config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "board_config.h"
|
||||
|
||||
#include <nuttx/board.h>
|
||||
#include <arch/board/board.h>
|
||||
|
||||
/*
|
||||
* Ideally we'd be able to get these from arm_internal.h,
|
||||
* but since we want to be able to disable the NuttX use
|
||||
* of leds for system indication at will and there is no
|
||||
* separate switch, we need to build independent of the
|
||||
* CONFIG_ARCH_LEDS configuration switch.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
__END_DECLS
|
||||
|
||||
# define xlat(p) (p)
|
||||
static uint32_t g_ledmap[] = {
|
||||
GPIO_nLED_GREEN, // Indexed by BOARD_LED_GREEN
|
||||
GPIO_nLED_BLUE, // Indexed by BOARD_LED_BLUE
|
||||
GPIO_nLED_RED, // Indexed by BOARD_LED_RED
|
||||
};
|
||||
|
||||
__EXPORT void led_init(void)
|
||||
{
|
||||
/* Configure LED GPIOs for output */
|
||||
for (size_t l = 0; l < (sizeof(g_ledmap) / sizeof(g_ledmap[0])); l++) {
|
||||
if (g_ledmap[l] != 0) {
|
||||
stm32_configgpio(g_ledmap[l]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void phy_set_led(int led, bool state)
|
||||
{
|
||||
/* Drive Low to switch on */
|
||||
if (g_ledmap[led] != 0) {
|
||||
stm32_gpiowrite(g_ledmap[led], !state);
|
||||
}
|
||||
}
|
||||
|
||||
static bool phy_get_led(int led)
|
||||
{
|
||||
/* If Low it is on */
|
||||
if (g_ledmap[led] != 0) {
|
||||
return !stm32_gpioread(g_ledmap[led]);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
__EXPORT void led_on(int led)
|
||||
{
|
||||
phy_set_led(xlat(led), true);
|
||||
}
|
||||
|
||||
__EXPORT void led_off(int led)
|
||||
{
|
||||
phy_set_led(xlat(led), false);
|
||||
}
|
||||
|
||||
__EXPORT void led_toggle(int led)
|
||||
{
|
||||
phy_set_led(xlat(led), !phy_get_led(xlat(led)));
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2020 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
//TODO:Prepare for NxtDual
|
||||
|
||||
#include <nuttx/spi/spi.h>
|
||||
#include <px4_platform_common/px4_manifest.h>
|
||||
// KiB BS nB
|
||||
static const px4_mft_device_t spi5 = { // FM25V02A on FMUM native: 32K X 8, emulated as (1024 Blocks of 32)
|
||||
.bus_type = px4_mft_device_t::SPI,
|
||||
.devid = SPIDEV_FLASH(0)
|
||||
};
|
||||
|
||||
static const px4_mtd_entry_t fmum_fram = {
|
||||
.device = &spi5,
|
||||
.npart = 1,
|
||||
.partd = {
|
||||
{
|
||||
.type = MTD_PARAMETERS,
|
||||
.path = "/fs/mtd_params",
|
||||
.nblocks = 32
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
static const px4_mtd_manifest_t board_mtd_config = {
|
||||
.nconfigs = 1,
|
||||
.entries = {
|
||||
&fmum_fram
|
||||
}
|
||||
};
|
||||
|
||||
static const px4_mft_entry_s mtd_mft = {
|
||||
.type = MTD,
|
||||
.pmft = (void *) &board_mtd_config,
|
||||
};
|
||||
|
||||
static const px4_mft_s mft = {
|
||||
.nmft = 1,
|
||||
.mfts = {
|
||||
&mtd_mft
|
||||
}
|
||||
};
|
||||
|
||||
const px4_mft_s *board_get_manifest(void)
|
||||
{
|
||||
return &mft;
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <board_config.h>
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <debug.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <nuttx/sdio.h>
|
||||
#include <nuttx/mmcsd.h>
|
||||
|
||||
#include "chip.h"
|
||||
#include "board_config.h"
|
||||
#include "stm32_gpio.h"
|
||||
#include "stm32_sdmmc.h"
|
||||
|
||||
#ifdef CONFIG_MMCSD
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Card detections requires card support and a card detection GPIO */
|
||||
|
||||
#define HAVE_NCD 1
|
||||
#if !defined(GPIO_SDMMC1_NCD)
|
||||
# undef HAVE_NCD
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
static FAR struct sdio_dev_s *sdio_dev;
|
||||
#ifdef HAVE_NCD
|
||||
static bool g_sd_inserted = 0xff; /* Impossible value */
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_ncd_interrupt
|
||||
*
|
||||
* Description:
|
||||
* Card detect interrupt handler.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_NCD
|
||||
static int stm32_ncd_interrupt(int irq, FAR void *context)
|
||||
{
|
||||
bool present;
|
||||
|
||||
present = !stm32_gpioread(GPIO_SDMMC1_NCD);
|
||||
|
||||
if (sdio_dev && present != g_sd_inserted) {
|
||||
sdio_mediachange(sdio_dev, present);
|
||||
g_sd_inserted = present;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: stm32_sdio_initialize
|
||||
*
|
||||
* Description:
|
||||
* Initialize SDIO-based MMC/SD card support
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int stm32_sdio_initialize(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
#ifdef HAVE_NCD
|
||||
/* Card detect */
|
||||
|
||||
bool cd_status;
|
||||
|
||||
/* Configure the card detect GPIO */
|
||||
|
||||
stm32_configgpio(GPIO_SDMMC1_NCD);
|
||||
|
||||
/* Register an interrupt handler for the card detect pin */
|
||||
|
||||
stm32_gpiosetevent(GPIO_SDMMC1_NCD, true, true, true, stm32_ncd_interrupt);
|
||||
#endif
|
||||
|
||||
/* Mount the SDIO-based MMC/SD block driver */
|
||||
/* First, get an instance of the SDIO interface */
|
||||
|
||||
finfo("Initializing SDIO slot %d\n", SDIO_SLOTNO);
|
||||
|
||||
sdio_dev = sdio_initialize(SDIO_SLOTNO);
|
||||
|
||||
if (!sdio_dev) {
|
||||
syslog(LOG_ERR, "[boot] Failed to initialize SDIO slot %d\n", SDIO_SLOTNO);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
/* Now bind the SDIO interface to the MMC/SD driver */
|
||||
|
||||
finfo("Bind SDIO to the MMC/SD driver, minor=%d\n", SDIO_MINOR);
|
||||
|
||||
ret = mmcsd_slotinitialize(SDIO_MINOR, sdio_dev);
|
||||
|
||||
if (ret != OK) {
|
||||
syslog(LOG_ERR, "[boot] Failed to bind SDIO to the MMC/SD driver: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
finfo("Successfully bound SDIO to the MMC/SD driver\n");
|
||||
|
||||
#ifdef HAVE_NCD
|
||||
/* Use SD card detect pin to check if a card is g_sd_inserted */
|
||||
|
||||
cd_status = !stm32_gpioread(GPIO_SDMMC1_NCD);
|
||||
finfo("Card detect : %d\n", cd_status);
|
||||
|
||||
sdio_mediachange(sdio_dev, cd_status);
|
||||
#else
|
||||
/* Assume that the SD card is inserted. What choice do we have? */
|
||||
|
||||
sdio_mediachange(sdio_dev, true);
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_MMCSD */
|
||||
@@ -0,0 +1,52 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/spi_hw_description.h>
|
||||
#include <drivers/drv_sensor.h>
|
||||
#include <nuttx/spi/spi.h>
|
||||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin2}, SPI::DRDY{GPIO::PortA, GPIO::Pin4}),
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_BMI270, SPI::CS{GPIO::PortA, GPIO::Pin2}, SPI::DRDY{GPIO::PortA, GPIO::Pin4})
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI3, {
|
||||
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin4})
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI4, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortC, GPIO::Pin13}, SPI::DRDY{GPIO::PortE, GPIO::Pin4}),
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_BMI270, SPI::CS{GPIO::PortC, GPIO::Pin13}, SPI::DRDY{GPIO::PortE, GPIO::Pin4})
|
||||
}),
|
||||
};
|
||||
|
||||
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
||||
@@ -0,0 +1,53 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include <px4_arch/io_timer_hw_description.h>
|
||||
|
||||
constexpr io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
initIOTimer(Timer::Timer1, DMA{DMA::Index1}),
|
||||
initIOTimer(Timer::Timer2, DMA{DMA::Index1}),
|
||||
initIOTimer(Timer::Timer3, DMA{DMA::Index1}),
|
||||
};
|
||||
|
||||
constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel1}, {GPIO::PortE, GPIO::Pin9}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel2}, {GPIO::PortE, GPIO::Pin11}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel3}, {GPIO::PortE, GPIO::Pin13}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer1, Timer::Channel4}, {GPIO::PortE, GPIO::Pin14}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer3, Timer::Channel4}, {GPIO::PortB, GPIO::Pin1}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer3, Timer::Channel3}, {GPIO::PortB, GPIO::Pin0}),
|
||||
initIOTimerChannel(io_timers, {Timer::Timer2, Timer::Channel1}, {GPIO::PortA, GPIO::Pin0})
|
||||
};
|
||||
|
||||
constexpr io_timers_channel_mapping_t io_timers_channel_mapping =
|
||||
initIOTimerChannelMapping(io_timers, timer_io_channels);
|
||||
@@ -0,0 +1,78 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (C) 2021 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name PX4 nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/**
|
||||
* @file usb.c
|
||||
*
|
||||
* Board-specific USB functions.
|
||||
*/
|
||||
|
||||
#include "board_config.h"
|
||||
#include <nuttx/usb/usbdev.h>
|
||||
#include <nuttx/usb/usbdev_trace.h>
|
||||
#include <stm32_otg.h>
|
||||
#include <debug.h>
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbinitialize
|
||||
*
|
||||
* Description:
|
||||
* Called to setup USB-related GPIO pins for the board.
|
||||
*
|
||||
************************************************************************************/
|
||||
|
||||
__EXPORT void stm32_usbinitialize(void)
|
||||
{
|
||||
/* The OTG FS has an internal soft pull-up */
|
||||
|
||||
/* Configure the OTG FS VBUS sensing GPIO, Power On, and Overcurrent GPIOs */
|
||||
|
||||
#ifdef CONFIG_STM32H7_OTGFS
|
||||
stm32_configgpio(GPIO_OTGFS_VBUS);
|
||||
#endif
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
* Name: stm32_usbsuspend
|
||||
*
|
||||
* Description:
|
||||
* Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is
|
||||
* used. This function is called whenever the USB enters or leaves suspend mode.
|
||||
* This is an opportunity for the board logic to shutdown clocks, power, etc.
|
||||
* while the USB is suspended.
|
||||
*
|
||||
************************************************************************************/
|
||||
__EXPORT void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume)
|
||||
{
|
||||
uinfo("resume: %d\n", resume);
|
||||
}
|
||||
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 131 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 387 KiB |
|
After Width: | Height: | Size: 253 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 1.0 MiB |
|
Before Width: | Height: | Size: 368 KiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 31 KiB |
@@ -35,7 +35,7 @@
|
||||
- [Static Pressure Buildup](advanced_config/static_pressure_buildup.md)
|
||||
- [Flying (Basics)](flying/basic_flying_mc.md)
|
||||
- [Complete Vehicles](complete_vehicles_mc/index.md)
|
||||
- [ModalAI Starling (PX4 Dev Kit)](complete_vehicles_mc/modalai_starling.md)
|
||||
- [ModalAI Starling](complete_vehicles_mc/modalai_starling.md)
|
||||
- [PX4 Vision Kit](complete_vehicles_mc/px4_vision_kit.md)
|
||||
- [MindRacer BNF & RTF](complete_vehicles_mc/mindracer_BNF_RTF.md)
|
||||
- [MindRacer 210](complete_vehicles_mc/mindracer210.md)
|
||||
@@ -194,6 +194,7 @@
|
||||
- [SVehicle E2](flight_controller/svehicle_e2.md)
|
||||
- [ThePeach FCC-K1](flight_controller/thepeach_k1.md)
|
||||
- [ThePeach FCC-R1](flight_controller/thepeach_r1.md)
|
||||
- [AP-H743-R1](flight_controller/x-mav_ap-h743r1.md)
|
||||
- [Experimental Autopilots](flight_controller/autopilot_experimental.md)
|
||||
- [BeagleBone Blue](flight_controller/beaglebone_blue.md)
|
||||
- [Raspberry Pi 2/3 Navio2](flight_controller/raspberry_pi_navio2.md)
|
||||
@@ -592,6 +593,7 @@
|
||||
- [FollowTargetEstimator](msg_docs/FollowTargetEstimator.md)
|
||||
- [FollowTargetStatus](msg_docs/FollowTargetStatus.md)
|
||||
- [FuelTankStatus](msg_docs/FuelTankStatus.md)
|
||||
- [GainCompression](msg_docs/GainCompression.md)
|
||||
- [GeneratorStatus](msg_docs/GeneratorStatus.md)
|
||||
- [GeofenceResult](msg_docs/GeofenceResult.md)
|
||||
- [GeofenceStatus](msg_docs/GeofenceStatus.md)
|
||||
@@ -742,8 +744,11 @@
|
||||
- [ArmingCheckReplyV0](msg_docs/ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](msg_docs/ArmingCheckRequestV0.md)
|
||||
- [BatteryStatusV0](msg_docs/BatteryStatusV0.md)
|
||||
- [ConfigOverridesV0](msg_docs/ConfigOverridesV0.md)
|
||||
- [EventV0](msg_docs/EventV0.md)
|
||||
- [HomePositionV0](msg_docs/HomePositionV0.md)
|
||||
- [RegisterExtComponentReplyV0](msg_docs/RegisterExtComponentReplyV0.md)
|
||||
- [RegisterExtComponentRequestV0](msg_docs/RegisterExtComponentRequestV0.md)
|
||||
- [VehicleAttitudeSetpointV0](msg_docs/VehicleAttitudeSetpointV0.md)
|
||||
- [VehicleLocalPositionV0](msg_docs/VehicleLocalPositionV0.md)
|
||||
- [VehicleStatusV0](msg_docs/VehicleStatusV0.md)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!-- GENERATED CONTENT: DO NOT EDIT -->
|
||||
|
||||
- [Introduction](/index.md)
|
||||
- [Basic Concepts](/getting_started/px4_basic_concepts.md)
|
||||
|
||||
@@ -36,7 +37,7 @@
|
||||
- [Static Pressure Buildup](/advanced_config/static_pressure_buildup.md)
|
||||
- [Flying (Basics)](/flying/basic_flying_mc.md)
|
||||
- [Complete Vehicles](/complete_vehicles_mc/index.md)
|
||||
- [ModalAI Starling (PX4 Dev Kit)](/complete_vehicles_mc/modalai_starling.md)
|
||||
- [ModalAI Starling](/complete_vehicles_mc/modalai_starling.md)
|
||||
- [PX4 Vision Kit](/complete_vehicles_mc/px4_vision_kit.md)
|
||||
- [MindRacer BNF & RTF](/complete_vehicles_mc/mindracer_BNF_RTF.md)
|
||||
- [MindRacer 210](/complete_vehicles_mc/mindracer210.md)
|
||||
@@ -57,11 +58,14 @@
|
||||
- [DJI F450 (CUAV v5 nano)](/frames_multicopter/dji_f450_cuav_5nano.md)
|
||||
|
||||
- [Planes (Fixed-Wing)](/frames_plane/index.md)
|
||||
- [Features](/features_fw/index.md)
|
||||
- [Gain compression](/features_fw/gain_compression.md)
|
||||
- [Assembly](/assembly/assembly_fw.md)
|
||||
- [Config/Tuning](/config_fw/index.md)
|
||||
- [Auto-tune](/config/autotune_fw.md)
|
||||
- [Rate/Attitude Controller Tuning Guide](/config_fw/pid_tuning_guide_fixedwing.md)
|
||||
- [Altitude/Position Controller Tuning Guide](/config_fw/position_tuning_guide_fixedwing.md)
|
||||
- [Airspeed Scale Estimate Handling](/config_fw/airspeed_scale_handling.md)
|
||||
- [Weight & Altitude Tuning](/config_fw/weight_and_altitude_tuning.md)
|
||||
- [Trimming Guide](/config_fw/trimming_guide_fixedwing.md)
|
||||
- [Flying (Basics)](/flying/basic_flying_fw.md)
|
||||
@@ -183,11 +187,13 @@
|
||||
- [Wiring Quickstart](/assembly/quick_start_durandal.md)
|
||||
- [Holybro Pix32 v5](/flight_controller/holybro_pix32_v5.md)
|
||||
- [Wiring Quickstart](/assembly/quick_start_holybro_pix32_v5.md)
|
||||
- [MicoAir H743 Lite](/flight_controller/micoair743-lite.md)
|
||||
- [ModalAI VOXL 2](/flight_controller/modalai_voxl_2.md)
|
||||
- [mRo Control Zero F7](/flight_controller/mro_control_zero_f7.md)
|
||||
- [Radiolink PIX6](/flight_controller/radiolink_pix6.md)
|
||||
- [Sky-Drones AIRLink](/flight_controller/airlink.md)
|
||||
- [SPRacing SPRacingH7EXTREME](/flight_controller/spracingh7extreme.md)
|
||||
- [SVehicle E2](/flight_controller/svehicle_e2.md)
|
||||
- [ThePeach FCC-K1](/flight_controller/thepeach_k1.md)
|
||||
- [ThePeach FCC-R1](/flight_controller/thepeach_r1.md)
|
||||
- [Experimental Autopilots](/flight_controller/autopilot_experimental.md)
|
||||
@@ -240,18 +246,22 @@
|
||||
- [TFSlot Airspeed Sensor](/sensor/airspeed_tfslot.md)
|
||||
- [Barometers](/sensor/barometer.md)
|
||||
- [Distance Sensors \(Rangefinders\)](/sensor/rangefinders.md)
|
||||
- [Ainstein US-D1 Standard Radar Altimeter](/sensor/ulanding_radar.md)
|
||||
- [ARK DIST SR (CAN/UART)](/dronecan/ark_dist.md)
|
||||
- [ARK DIST MR (CAN/UART)](/dronecan/ark_dist_mr.md)
|
||||
- [Benewake TFmini Lidar](/sensor/tfmini.md)
|
||||
- [LeddarOne Lidar](/sensor/leddar_one.md)
|
||||
- [Lidar-Lite](/sensor/lidar_lite.md)
|
||||
- [Lightware Lidars (SF/LW)](/sensor/sfxx_lidar.md)
|
||||
- [Lightware SF45 Rotary Lidar](/sensor/sf45_rotating_lidar.md)
|
||||
- [Ainstein US-D1 Standard Radar Altimeter](/sensor/ulanding_radar.md)
|
||||
- [LeddarOne Lidar](/sensor/leddar_one.md)
|
||||
- [Benewake TFmini Lidar](/sensor/tfmini.md)
|
||||
- [Lidar-Lite](/sensor/lidar_lite.md)
|
||||
- [TeraRanger](/sensor/teraranger.md)
|
||||
- [✘ Lanbao PSK-CM8JL65-CC5](/sensor/cm8jl65_ir_distance_sensor.md)
|
||||
- [Avionics Anonymous Laser Altimeter UAVCAN Interface (CAN)](/dronecan/avanon_laser_interface.md)
|
||||
- [GNSS (GPS)](/gps_compass/index.md)
|
||||
- [ARK GPS (CAN)](/dronecan/ark_gps.md)
|
||||
- [ARK DAN GPS](/gps_compass/ark_dan_gps.md)
|
||||
- [ARK SAM GPS](/gps_compass/ark_sam_gps.md)
|
||||
- [ARK SAM GPS MINI](/gps_compass/ark_sam_gps_mini.md)
|
||||
- [ARK TESEO GPS](/dronecan/ark_teseo_gps.md)
|
||||
- [CUAV NEO 3 GPS](/gps_compass/gps_cuav_neo_3.md)
|
||||
- [CUAV NEO 3 Pro GPS (CAN)](/gps_compass/gps_cuav_neo_3pro.md)
|
||||
@@ -263,6 +273,8 @@
|
||||
- [Sky-Drones SmartAP GPS](/gps_compass/gps_smartap.md)
|
||||
- [RTK GNSS](/gps_compass/rtk_gps.md)
|
||||
- [ARK RTK GPS (CAN)](/dronecan/ark_rtk_gps.md)
|
||||
- [ARK RTK GPS L1 L5 (CAN)](/dronecan/ark_rtk_gps_l1_l2.md)
|
||||
- [ARK X20 RTK GPS (CAN)](/dronecan/ark_x20_rtk_gps.md)
|
||||
- [ARK MOSAIC-X5 RTK GPS (CAN)](/dronecan/ark_mosaic__rtk_gps.md)
|
||||
- [RTK GPS Heading with Dual u-blox F9P](/gps_compass/u-blox_f9p_heading.md)
|
||||
- [CUAV C-RTK](/gps_compass/rtk_gps_cuav_c-rtk.md)
|
||||
@@ -285,6 +297,7 @@
|
||||
- [CubePilot Here+ (Discontined)](/gps_compass/rtk_gps_hex_hereplus.md)
|
||||
- [INS (Inertial Navigation/GNSS)](/sensor/inertial_navigation_systems.md)
|
||||
- [InertialLabs](/sensor/inertiallabs.md)
|
||||
- [MicroStrain](/sensor/microstrain.md)
|
||||
- [sbgECom](/sensor/sbgecom.md)
|
||||
- [VectorNav](/sensor/vectornav.md)
|
||||
- [Optical Flow](/sensor/optical_flow.md)
|
||||
@@ -339,13 +352,14 @@
|
||||
- [Battery Estimation Tuning](/config/battery.md)
|
||||
- [Battery Chemistry Overview](/power_systems/battery_chemistry.md)
|
||||
- [Power Modules/PDB](/power_module/index.md)
|
||||
- [ARK PAB Power Module](/power_module/ark_pab_power_module.md)
|
||||
- [ARK 12S PAB Power Module](/power_module/ark_12s_pab_power_module.md)
|
||||
- [ARK 12S Payload Power Module](/power_module/ark_12s_payload_power_module.md)
|
||||
- [CUAV HV pm](/power_module/cuav_hv_pm.md)
|
||||
- [CUAV CAN PMU](/dronecan/cuav_can_pmu.md)
|
||||
- [Holybro PM02](/power_module/holybro_pm02.md)
|
||||
- [Holybro PM07](/power_module/holybro_pm07_pixhawk4_power_module.md)
|
||||
- [Holybro PM06 V2](/power_module/holybro_pm06_pixhawk4mini_power_module.md)
|
||||
- [ARK PAB Power Module](/power_module/ark_pab_power_module.md)
|
||||
- [ARK 12S PAB Power Module](/power_module/ark_12s_pab_power_module.md)
|
||||
- [Holybro PM02D (digital)](/power_module/holybro_pm02d.md)
|
||||
- [Holybro PM03D (digital)](/power_module/holybro_pm03d.md)
|
||||
- [Pomegranate Systems Power Module](/dronecan/pomegranate_systems_pm.md)
|
||||
@@ -483,6 +497,7 @@
|
||||
- [UART/Serial Ports](/uart/index.md)
|
||||
- [Port-Configurable Serial Drivers](/uart/user_configurable_serial_driver.md)
|
||||
- [RTK GPS (Integration)](/advanced/rtk_gps.md)
|
||||
- [PPS Time Synchronization](/advanced/pps_time_sync.md)
|
||||
- [Middleware](/middleware/index.md)
|
||||
- [uORB Messaging](/middleware/uorb.md)
|
||||
- [uORB Graph](/middleware/uorb_graph.md)
|
||||
@@ -579,6 +594,7 @@
|
||||
- [FollowTargetEstimator](/msg_docs/FollowTargetEstimator.md)
|
||||
- [FollowTargetStatus](/msg_docs/FollowTargetStatus.md)
|
||||
- [FuelTankStatus](/msg_docs/FuelTankStatus.md)
|
||||
- [GainCompression](/msg_docs/GainCompression.md)
|
||||
- [GeneratorStatus](/msg_docs/GeneratorStatus.md)
|
||||
- [GeofenceResult](/msg_docs/GeofenceResult.md)
|
||||
- [GeofenceStatus](/msg_docs/GeofenceStatus.md)
|
||||
@@ -669,8 +685,6 @@
|
||||
- [RoverSpeedStatus](/msg_docs/RoverSpeedStatus.md)
|
||||
- [RoverSteeringSetpoint](/msg_docs/RoverSteeringSetpoint.md)
|
||||
- [RoverThrottleSetpoint](/msg_docs/RoverThrottleSetpoint.md)
|
||||
- [RoverVelocitySetpoint](/msg_docs/RoverVelocitySetpoint.md)
|
||||
- [RoverVelocityStatus](/msg_docs/RoverVelocityStatus.md)
|
||||
- [Rpm](/msg_docs/Rpm.md)
|
||||
- [RtlStatus](/msg_docs/RtlStatus.md)
|
||||
- [RtlTimeEstimate](/msg_docs/RtlTimeEstimate.md)
|
||||
@@ -682,6 +696,7 @@
|
||||
- [SensorCombined](/msg_docs/SensorCombined.md)
|
||||
- [SensorCorrection](/msg_docs/SensorCorrection.md)
|
||||
- [SensorGnssRelative](/msg_docs/SensorGnssRelative.md)
|
||||
- [SensorGnssStatus](/msg_docs/SensorGnssStatus.md)
|
||||
- [SensorGps](/msg_docs/SensorGps.md)
|
||||
- [SensorGyro](/msg_docs/SensorGyro.md)
|
||||
- [SensorGyroFft](/msg_docs/SensorGyroFft.md)
|
||||
@@ -691,6 +706,7 @@
|
||||
- [SensorOpticalFlow](/msg_docs/SensorOpticalFlow.md)
|
||||
- [SensorPreflightMag](/msg_docs/SensorPreflightMag.md)
|
||||
- [SensorSelection](/msg_docs/SensorSelection.md)
|
||||
- [SensorTemp](/msg_docs/SensorTemp.md)
|
||||
- [SensorUwb](/msg_docs/SensorUwb.md)
|
||||
- [SensorsStatus](/msg_docs/SensorsStatus.md)
|
||||
- [SensorsStatusImu](/msg_docs/SensorsStatusImu.md)
|
||||
@@ -729,8 +745,11 @@
|
||||
- [ArmingCheckReplyV0](/msg_docs/ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](/msg_docs/ArmingCheckRequestV0.md)
|
||||
- [BatteryStatusV0](/msg_docs/BatteryStatusV0.md)
|
||||
- [ConfigOverridesV0](/msg_docs/ConfigOverridesV0.md)
|
||||
- [EventV0](/msg_docs/EventV0.md)
|
||||
- [HomePositionV0](/msg_docs/HomePositionV0.md)
|
||||
- [RegisterExtComponentReplyV0](/msg_docs/RegisterExtComponentReplyV0.md)
|
||||
- [RegisterExtComponentRequestV0](/msg_docs/RegisterExtComponentRequestV0.md)
|
||||
- [VehicleAttitudeSetpointV0](/msg_docs/VehicleAttitudeSetpointV0.md)
|
||||
- [VehicleLocalPositionV0](/msg_docs/VehicleLocalPositionV0.md)
|
||||
- [VehicleStatusV0](/msg_docs/VehicleStatusV0.md)
|
||||
@@ -743,6 +762,7 @@
|
||||
- [Standard Modes Protocol](/mavlink/standard_modes.md)
|
||||
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](/middleware/uxrce_dds.md)
|
||||
- [UORB Bridged to ROS 2](/middleware/dds_topics.md)
|
||||
- [Zenoh (PX4 ROS 2)](/middleware/zenoh.md)
|
||||
- [Modules & Commands](/modules/modules_main.md)
|
||||
- [Autotune](/modules/modules_autotune.md)
|
||||
- [Commands](/modules/modules_command.md)
|
||||
@@ -760,6 +780,7 @@
|
||||
- [Rpm Sensor](/modules/modules_driver_rpm_sensor.md)
|
||||
- [Radio Control](/modules/modules_driver_radio_control.md)
|
||||
- [Transponder](/modules/modules_driver_transponder.md)
|
||||
- [adc](/modules/modules_driver_adc.md)
|
||||
- [Estimators](/modules/modules_estimator.md)
|
||||
- [Simulations](/modules/modules_simulation.md)
|
||||
- [System](/modules/modules_system.md)
|
||||
|
||||
@@ -26,6 +26,10 @@ If you are looking for more resources to learn about the module, a website has b
|
||||
|
||||
## Neural Network PX4 Firmware
|
||||
|
||||
::: warning
|
||||
This module requires Ubuntu 24.04 or newer (it is not supported in Ubuntu 22.04).
|
||||
:::
|
||||
|
||||
The module has been tested on a number of configurations, which can be build locally using the commands:
|
||||
|
||||
```sh
|
||||
|
||||
@@ -486,6 +486,16 @@ The integer refers to the I2C bus number where PCA9685 is connected.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 10 | | 0 |
|
||||
|
||||
### PCA9685_I2C_ADDR (`INT32`) {#PCA9685_I2C_ADDR}
|
||||
|
||||
I2C address of PCA9685.
|
||||
|
||||
The default address is 0x40 (64).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 127 | | 64 |
|
||||
|
||||
### PCA9685_FAIL1 (`INT32`) {#PCA9685_FAIL1}
|
||||
|
||||
PCA9685 Output Channel 1 Failsafe Value.
|
||||
@@ -2177,6 +2187,116 @@ output latency, or completely block I2C bus.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 50.0 | 400.0 | | 50.0 |
|
||||
|
||||
### PWM_AUX_CENT1 (`INT32`) {#PWM_AUX_CENT1}
|
||||
|
||||
PWM Aux 1 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT10 (`INT32`) {#PWM_AUX_CENT10}
|
||||
|
||||
PWM Capture 2 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT11 (`INT32`) {#PWM_AUX_CENT11}
|
||||
|
||||
PWM Capture 3 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT2 (`INT32`) {#PWM_AUX_CENT2}
|
||||
|
||||
PWM Aux 2 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT3 (`INT32`) {#PWM_AUX_CENT3}
|
||||
|
||||
PWM Aux 3 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT4 (`INT32`) {#PWM_AUX_CENT4}
|
||||
|
||||
PWM Aux 4 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT5 (`INT32`) {#PWM_AUX_CENT5}
|
||||
|
||||
PWM Aux 5 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT6 (`INT32`) {#PWM_AUX_CENT6}
|
||||
|
||||
PWM Aux 6 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT7 (`INT32`) {#PWM_AUX_CENT7}
|
||||
|
||||
PWM Aux 7 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT8 (`INT32`) {#PWM_AUX_CENT8}
|
||||
|
||||
PWM Aux 8 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_CENT9 (`INT32`) {#PWM_AUX_CENT9}
|
||||
|
||||
PWM Capture 1 Center Value.
|
||||
|
||||
Servo Center output value (when not disarmed).
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -1 | 2200 | | -1 |
|
||||
|
||||
### PWM_AUX_DIS1 (`INT32`) {#PWM_AUX_DIS1}
|
||||
|
||||
PWM Aux 1 Disarmed Value.
|
||||
@@ -14247,22 +14367,6 @@ Defines which RC_MAP_AUXn parameter maps the manual control channel used to enab
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 6 | | 0 |
|
||||
|
||||
### FW_AT_START (`INT32`) {#FW_AT_START}
|
||||
|
||||
Start the autotuning sequence.
|
||||
|
||||
WARNING: this will inject steps to the rate controller
|
||||
and can be dangerous. Only activate if you know what you
|
||||
are doing, and in a safe environment.
|
||||
Any motion of the remote stick will abort the signal
|
||||
injection and reset this parameter
|
||||
Best is to perform the identification in position or
|
||||
hold mode.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------------ | ---- |
|
||||
| | | | | Disabled (0) |
|
||||
|
||||
### FW_AT_SYSID_F0 (`FLOAT`) {#FW_AT_SYSID_F0}
|
||||
|
||||
Start frequency of the injected signal.
|
||||
@@ -14346,24 +14450,6 @@ Desired angular rate closed-loop rise time.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0.01 | 0.5 | | 0.14 | s |
|
||||
|
||||
### MC_AT_START (`INT32`) {#MC_AT_START}
|
||||
|
||||
Start the autotuning sequence.
|
||||
|
||||
WARNING: this will inject steps to the rate controller
|
||||
and can be dangerous. Only activate if you know what you
|
||||
are doing, and in a safe environment.
|
||||
Any motion of the remote stick will abort the signal
|
||||
injection and reset this parameter
|
||||
Best is to perform the identification in position or
|
||||
hold mode.
|
||||
Increase the amplitude of the injected signal using
|
||||
MC_AT_SYSID_AMP for more signal/noise ratio
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------------ | ---- |
|
||||
| | | | | Disabled (0) |
|
||||
|
||||
### MC_AT_SYSID_AMP (`FLOAT`) {#MC_AT_SYSID_AMP}
|
||||
|
||||
Amplitude of the injected signal.
|
||||
@@ -15346,8 +15432,7 @@ disabled, warn only or deny arming.
|
||||
Arm switch is a momentary button.
|
||||
|
||||
0: Arming/disarming triggers on switch transition.
|
||||
1: Arming/disarming triggers when holding the momentary button down
|
||||
for COM_RC_ARM_HYST like the stick gesture.
|
||||
1: Arming/disarming triggers when holding the momentary button down like the stick gesture.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------------ | ---- |
|
||||
@@ -15355,15 +15440,17 @@ for COM_RC_ARM_HYST like the stick gesture.
|
||||
|
||||
### COM_ARM_WO_GPS (`INT32`) {#COM_ARM_WO_GPS}
|
||||
|
||||
GPS preflight check.
|
||||
Arming without GNSS configuration.
|
||||
|
||||
Measures taken when a check defined by EKF2_GPS_CHECK is failing.
|
||||
Configures whether arming is allowed without GNSS, for modes that require a global position
|
||||
(specifically, in those modes when a check defined by EKF2_GPS_CHECK fails).
|
||||
The settings deny arming and warn, allow arming and warn, or silently allow arming.
|
||||
|
||||
**Values:**
|
||||
|
||||
- `0`: Deny arming
|
||||
- `1`: Warning only
|
||||
- `2`: Disabled
|
||||
- `1`: Allow arming (with warning)
|
||||
- `2`: Allow arming (no warning)
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -16152,16 +16239,6 @@ External modes requiring stick input will still failsafe.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0 | 31 | | 0 |
|
||||
|
||||
### COM_RC_ARM_HYST (`INT32`) {#COM_RC_ARM_HYST}
|
||||
|
||||
Manual control input arm/disarm command duration.
|
||||
|
||||
The default value of 1000 requires the stick to be held in the arm or disarm position for 1 second.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 100 | 1500 | | 1000 | ms |
|
||||
|
||||
### COM_RC_IN_MODE (`INT32`) {#COM_RC_IN_MODE}
|
||||
|
||||
Manual control input source configuration.
|
||||
@@ -16996,6 +17073,16 @@ EKF2 enable.
|
||||
| ------ | -------- | -------- | --------- | ----------- | ---- |
|
||||
| | | | | Enabled (1) |
|
||||
|
||||
### EKF2_ENGINE_WRM (`INT32`) {#EKF2_ENGINE_WRM}
|
||||
|
||||
Enable constant position fusion during engine warmup.
|
||||
|
||||
When enabled, constant position fusion is enabled when the vehicle is landed and armed. This is intended for IC engine warmup (e.g., fuel engines on catapult) to allow mode transitions to auto/takeoff despite vibrations from running engines.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------------ | ---- |
|
||||
| | | | | Disabled (0) |
|
||||
|
||||
### EKF2_EVA_NOISE (`FLOAT`) {#EKF2_EVA_NOISE}
|
||||
|
||||
Measurement noise for vision angle measurements.
|
||||
@@ -19347,6 +19434,24 @@ This increment is added to TRIM_YAW when airspeed is FW_AIRSPD_MIN.
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | -0.5 | 0.5 | 0.01 | 0.0 |
|
||||
|
||||
### FW_GC_EN (`INT32`) {#FW_GC_EN}
|
||||
|
||||
Enable rate gain compression.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ----------- | ---- |
|
||||
| | | | | Enabled (1) |
|
||||
|
||||
### FW_GC_GAIN_MIN (`FLOAT`) {#FW_GC_GAIN_MIN}
|
||||
|
||||
Compression gain lower limit.
|
||||
|
||||
The range of the compression gain is between this parameter and 1.0
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
| | 0.0 | 1.0 | 0.01 | 0.3 |
|
||||
|
||||
### FW_MAN_P_SC (`FLOAT`) {#FW_MAN_P_SC}
|
||||
|
||||
Manual pitch scale.
|
||||
@@ -21989,6 +22094,8 @@ Control Surface 0 configuration as spoiler.
|
||||
Control Surface 0 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22069,6 +22176,8 @@ Control Surface 1 configuration as spoiler.
|
||||
Control Surface 1 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22149,6 +22258,8 @@ Control Surface 2 configuration as spoiler.
|
||||
Control Surface 2 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22229,6 +22340,8 @@ Control Surface 3 configuration as spoiler.
|
||||
Control Surface 3 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22309,6 +22422,8 @@ Control Surface 4 configuration as spoiler.
|
||||
Control Surface 4 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22389,6 +22504,8 @@ Control Surface 5 configuration as spoiler.
|
||||
Control Surface 5 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22469,6 +22586,8 @@ Control Surface 6 configuration as spoiler.
|
||||
Control Surface 6 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -22549,6 +22668,8 @@ Control Surface 7 configuration as spoiler.
|
||||
Control Surface 7 trim.
|
||||
|
||||
Can be used to add an offset to the servo control.
|
||||
NOTE: Do not use for PWM servos. Use the PWM CENTER parameters instead (e.g., PWM_MAIN_CENT, PWM_AUX_CENT) instead.
|
||||
This parameter can only be set if all PWM Center parameters are set to default.
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
@@ -23162,6 +23283,7 @@ Engine start/stop input source.
|
||||
- `0`: On arming - disarming
|
||||
- `1`: Aux1
|
||||
- `2`: Aux2
|
||||
- `3`: On Vtol Transitions
|
||||
|
||||
| Reboot | minValue | maxValue | increment | default | unit |
|
||||
| ------ | -------- | -------- | --------- | ------- | ---- |
|
||||
|
||||
@@ -1,126 +1,39 @@
|
||||
# ModalAI Starling (PX4 Autonomy Developer Kit)
|
||||
# ModalAI Starling 2
|
||||
|
||||
The [Starlings](https://www.modalai.com/pages/starlings) are SLAM development drones supercharged by [VOXL 2](../flight_controller/modalai_voxl_2.md) and PX4 with SWAP-optimized sensors and payloads optimized for indoor and outdoor autonomous navigation.
|
||||
Powered by Blue UAS Framework autopilot, VOXL 2, the Starling weighs only 275g and boasts an impressive 30 minutes of autonomous indoor flight time.
|
||||
The [Starlings](https://www.modalai.com/pages/starlings) are NDAA-compliant SLAM development drones based on the [VOXL 2](../flight_controller/modalai_voxl_2.md) and PX4 with SWAP-optimized sensors and payloads optimized for indoor and outdoor autonomous navigation.
|
||||
|
||||

|
||||
## Overview
|
||||
|
||||
The ModalAI PX4 Autonomy Developer Kit is a Starling-based development drone.
|
||||
It houses a [VOXL 2](../flight_controller/modalai_voxl_2.md), which is a powerful companion computer and PX4 flight controller in one small package, image sensors, GPS, and connectivity modem, and is ready-to-fly out-of-the-box.
|
||||
The Starling features ModalAI's [open SDK](https://docs.modalai.com/voxl-developer-bootcamp/) that has pre-configured autonomy models for computer vision assisted flight.
|
||||
This development drone is meant to help you get to market faster and accelerate your application development and prototyping.
|
||||
Starling drones house _VOXL 2_, which is a powerful companion computer, a PX4 flight controller, image sensors, GPS, and connectivity modem, in one small package.
|
||||
The Starlings feature ModalAI's open source [VOXL SDK](https://gitlab.com/voxl-public/voxl-sdk) that has pre-configured autonomy models for computer vision assisted flight.
|
||||
|
||||
This guide explains the minimal additional setup required to get the UAV ready to fly.
|
||||
It also covers a hardware overview, first flight, setting up WiFi, and more.
|
||||
|
||||
::: info
|
||||
For complete and regularly updated documentation, please visit <https://docs.modalai.com/starling-v2>.
|
||||
:::
|
||||
These development drones are ready-to-fly out-of-the-box.
|
||||
They are designed to help you get to market faster and accelerate your application development and prototyping.
|
||||
|
||||
::: info
|
||||
If you are new to VOXL, be sure to familiarize yourself with the core features of VOXL hardware and software by reviewing the [VOXL Bootcamp](https://docs.modalai.com/voxl-developer-bootcamp/).
|
||||
:::
|
||||
|
||||
::: info
|
||||
For complete and regularly updated documentation, please visit <https://docs.modalai.com/starling-2/> and <https://docs.modalai.com/starling-2-max/>.
|
||||
:::
|
||||
|
||||
## Starling 2
|
||||
|
||||
The [Starling 2](https://www.modalai.com/products/starling-2) is an NDAA-compliant development drone supercharged by the VOXL SDK and equipped with a new image sensor suite for precise, indoor visual navigation and SLAM. Powered by the Blue UAS Framework autopilot, VOXL 2, the Starling 2 weighs 280g and boasts an impressive 40 minutes of autonomous flight time.
|
||||
|
||||

|
||||
|
||||
## Starling 2 Max
|
||||
|
||||
The [Starling 2 Max](https://www.modalai.com/products/starling-2-max) is VOXL 2-powered, NDAA-compliant development drone supercharged by VOXL SDK specifically designed for computer vision-based, long-range dead reckoning with a 500g payload capacity. Powered by the Blue UAS Framework autopilot, VOXL 2, the Starling 2 Max weighs 500g and boasts an impressive 55 minutes of autonomous flight time.
|
||||
|
||||

|
||||
|
||||
## Where to Buy
|
||||
|
||||
[ModalAI PX4 Autonomy Developer Kit](https://www.modalai.com/products/px4-autonomy-developer-kit?variant=46969885950256)
|
||||
[ModalAI Starling 2](https://www.modalai.com/products/starling-2)
|
||||
|
||||
## Hardware Overview
|
||||
|
||||

|
||||
|
||||
| Callout | Description | MPN |
|
||||
| ------- | ------------------------------------- | ---------------- |
|
||||
| A | VOXL 2 | MDK-M0054-1 |
|
||||
| B | VOXL 4-in-1 ESC | MDK-M0117-1 |
|
||||
| C | Barometer Shield Cap | M10000533 |
|
||||
| D | ToF Image Sensor (PMD) | MDK-M0040 |
|
||||
| E | Tracking Image Sensor (OV7251) | M0014 |
|
||||
| F | Hires Image Sensor (IMX214) | M0025-2 |
|
||||
| G | AC600 WiFi Dongle | AWUS036EACS |
|
||||
| H | GNSS GPS Module & Compass | M10-5883 |
|
||||
| I | 915MHz ELRS Receiver | BetaFPV Nano RX |
|
||||
| J | USB C Connector on VOXL 2 (not shown) | |
|
||||
| K | VOXL Power Module | MCCA-M0041-5-B-T |
|
||||
| L | 4726FM Propellor | M10000302 |
|
||||
| M | Motor 1504 | |
|
||||
| N | XT30 Power Connector | |
|
||||
|
||||
## Datasheet
|
||||
|
||||
### Specifications
|
||||
|
||||
| Component | Specification |
|
||||
| --------------- | ----------------------------------------------------------------- |
|
||||
| Autopilot | VOXL2 |
|
||||
| Take-off Weight | 275g (172g without battery) |
|
||||
| Diagonal Size | 211mm |
|
||||
| Flight Time | >30 minutes |
|
||||
| Motors | 1504 |
|
||||
| Propellers | 120mm |
|
||||
| Frame | 3mm Carbon Fiber |
|
||||
| ESC | ModalAI VOXL 4-in-1 ESC V2 |
|
||||
| GPS | UBlox M10 |
|
||||
| RC Receiver | 915mhz ELRS |
|
||||
| Power Module | ModalAI Power Module v3 - 5V/6A |
|
||||
| Battery | Sony VTC6 3000mah 2S, or any 2S 18650 battery with XT30 connector |
|
||||
| Height | 83mm |
|
||||
| Width | 187mm (Props folded) |
|
||||
| Length | 142mm (Props folded) |
|
||||
|
||||
### Hardware Wiring Diagram
|
||||
|
||||

|
||||
|
||||
## Tutorials
|
||||
|
||||
### ELRS Set Up
|
||||
|
||||
Binding your ELRS (ExpressLRS) receiver to a transmitter is a crucial step in preparing your VOXL 2 based PX4 Autonomy Developer Kit by ModalAI for flight.
|
||||
This process ensures a secure and responsive connection between your drone and its control system.
|
||||
|
||||
Follow this guide to bind your ELRS receiver to your transmitter.
|
||||
|
||||
#### Setting up the Receiver
|
||||
|
||||
1. **Power On the Receiver**: Once your drone is powered on, you'll notice the ELRS receiver's blue LED flashing.
|
||||
This is an indication that the receiver is on but has not yet established a connection with a transmitter.
|
||||
|
||||

|
||||
|
||||
2. **Enter Binding Mode**: To initiate binding, open a terminal and execute the `adb shell` and `voxl-elrs -bind` commands.
|
||||
You'll observe the receiver's LED switch to a flashing in a heartbeat pattern, signaling that it is now in binding mode.
|
||||
|
||||

|
||||
|
||||
#### Setting up the Transmitter
|
||||
|
||||
1. **Access the Menu**: On your Commando 8 radio transmitter included in the kit, press the left mode button to open the menu system.
|
||||
|
||||

|
||||
|
||||
2. **Navigate to ExpressLRS**: Use the right button to select the first menu entry, which should be "ExpressLRS."
|
||||
3. **Find the Bind Option**: With the "ExpressLRS" option selected, scroll down to the bottom of the menu to locate the "Bind" section. This can be done by pressing the right button downwards until you reach the "Bind" option.
|
||||
|
||||

|
||||
|
||||
4. **Initiate Binding**: Select "Bind" to put the transmitter into binding mode. You will know the process has been successful when the transmitter emits a beep, indicating a successful bind.
|
||||
|
||||
#### Completing the Binding Process
|
||||
|
||||
Once the transmitter is set to bind mode, the ELRS receiver on the drone will change its LED from flashing to a steady light, signifying a successful connection between the receiver and the transmitter.
|
||||
|
||||
- **Power Cycle**: After the binding process is complete, it's essential to power cycle the VOXL 2 before attempting to fly.
|
||||
This means turning off the VOXL 2 and then turning it back on.
|
||||
This step ensures that all settings are properly applied and that the system recognizes the newly established connection.
|
||||
|
||||
You should now have a successfully bound ELRS receiver to your transmitter, ready for use with the PX4 Autonomy Kit by ModalAI.
|
||||
A secure connection is vital for the reliable operation of your drone, so always confirm the binding status before flight.
|
||||
|
||||
### Videos
|
||||
|
||||
- [VOXL 2 Starling Hardware Overview](https://youtu.be/M9OiMpbEYOg)
|
||||
- [VOXL 2 Starling First Flight Tutorial](https://youtu.be/Cpbbye3Z6co)
|
||||
- [VOXL 2 Starling ELRS Set Up](https://youtu.be/7OwGS-kcFVg)
|
||||
[ModalAI Starling 2 Max](https://www.modalai.com/products/starling-2-max)
|
||||
|
||||
<!-- @katzfey - ModalAI reviewer -->
|
||||
|
||||
@@ -10,7 +10,7 @@ If you have [mounted the compass](../assembly/mount_gps_compass.md#compass-orien
|
||||
|
||||
## Overview
|
||||
|
||||
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to recalibrate it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
|
||||
You will need to calibrate your compass(es) when you first setup your vehicle, and you may need to [recalibrate](#recalibration) it if the vehicles is ever exposed to a very strong magnetic field, or if it is used in an area with abnormal magnetic characteristics.
|
||||
|
||||
:::tip
|
||||
Indications of a poor compass calibration include multicopter circling during hover, toilet bowling (circling at increasing radius/spiraling-out, usually constant altitude, leading to fly-way), or veering off-path when attempting to fly straight.
|
||||
@@ -20,13 +20,16 @@ _QGroundControl_ should also notify the error `mag sensors inconsistent`.
|
||||
The process calibrates all compasses and autodetects the orientation of any external compasses.
|
||||
If any external magnetometers are available, it then disables the internal magnetometers (these are primarily needed for automatic rotation detection of external magnetometers).
|
||||
|
||||
### Types of Calibration
|
||||
|
||||
Several types of compass calibration are available:
|
||||
|
||||
1. [Complete](#complete-calibration): This calibration is required after installing the autopilot on an airframe for the first time or when the configuration of the vehicle has changed significantly.
|
||||
It compensates for hard and soft iron effects by estimating an offset and a scale factor for each axis.
|
||||
1. [Partial](#partial-quick-calibration): This calibration can be performed as a routine when preparing the vehicle for a flight, after changing the payload, or simply when the compass rose seems inaccurate.
|
||||
This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
1. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration. This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
1. [Large vehicle](#large-vehicle-calibration): This calibration can be performed when the vehicle is too large or heavy to perform a complete calibration.
|
||||
This type of calibration only estimates the offsets to compensate for a hard iron effect.
|
||||
|
||||
## Performing the Calibration
|
||||
|
||||
@@ -48,23 +51,27 @@ Before starting the calibration:
|
||||
The calibration steps are:
|
||||
|
||||
1. Start _QGroundControl_ and connect the vehicle.
|
||||
1. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
1. Click the **Compass** sensor button.
|
||||
2. Select **"Q" icon > Vehicle Setup > Sensors** (sidebar) to open _Sensor Setup_.
|
||||
3. Click the **Compass** sensor button.
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md). If not, you can also set it here.
|
||||
You should already have set the [Autopilot Orientation](../config/flight_controller_orientation.md).
|
||||
If not, you can also set it here.
|
||||
:::
|
||||
|
||||
1. Click **OK** to start the calibration.
|
||||
1. Place the vehicle in any of the orientations shown in red (incomplete) and hold it still. Once prompted (the orientation-image turns yellow) rotate the vehicle around the specified axis in either/both directions. Once the calibration is complete for the current orientation the associated image on the screen will turn green.
|
||||
4. Click **OK** to start the calibration.
|
||||
5. Place the vehicle in any of the orientations shown in red (incomplete) and hold it still.
|
||||
Once prompted (the orientation-image turns yellow) rotate the vehicle around the specified axis in either/both directions.
|
||||
Once the calibration is complete for the current orientation the associated image on the screen will turn green.
|
||||
|
||||

|
||||
|
||||
1. Repeat the calibration process for all vehicle orientations.
|
||||
6. Repeat the calibration process for all vehicle orientations.
|
||||
|
||||
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely). You can then proceed to the next sensor.
|
||||
Once you've calibrated the vehicle in all the positions _QGroundControl_ will display _Calibration complete_ (all orientation images will be displayed in green and the progress bar will fill completely).
|
||||
You can then proceed to the next sensor.
|
||||
|
||||
### Partial "Quick" Calibration
|
||||
|
||||
@@ -87,7 +94,8 @@ Notes:
|
||||
|
||||
This calibration process leverages external knowledge of vehicle's orientation and location, and a World Magnetic Model (WMM) to calibrate the hard iron biases.
|
||||
|
||||
1. Ensure GNSS Fix. This is required to find the expected Earth magnetic field in WMM tables.
|
||||
1. Ensure GNSS Fix.
|
||||
This is required to find the expected Earth magnetic field in WMM tables.
|
||||
2. Align the vehicle to face True North.
|
||||
Be as accurate as possible for best results.
|
||||
3. Open the [QGroundControl MAVLink Console](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/mavlink_console.html) and send the following command:
|
||||
@@ -107,6 +115,30 @@ Notes:
|
||||
|
||||
After the calibration is complete, check that the heading indicator and the heading of the arrow on the map are stable and match the orientation of the vehicle when turning it e.g. to the cardinal directions.
|
||||
|
||||
## Recalibration
|
||||
|
||||
Recalibration is recommended whenever the magnetic environment of the vehicle has changed or when heading behavior appears unreliable.
|
||||
|
||||
You can use either complete calibration or mag quick calibration depending on the size of the vehicle and your ability to rotate it through the required orientations.
|
||||
Complete calibration provides the most accurate soft-iron compensation.
|
||||
|
||||
Recalibrate the compass when:
|
||||
|
||||
- _The compass module or its mounting orientation has changed._
|
||||
This includes replacing the GPS or mag unit, rotating the mast, or altering how the module is fixed to the airframe.
|
||||
- _The vehicle has been exposed to a strong magnetic disturbance._
|
||||
Examples include transport or storage near large steel structures, welding operations near the airframe, or operation close to high-current equipment.
|
||||
- _Structural, wiring, or payload changes may have altered the magnetic field around the sensors._
|
||||
New payloads, rerouted wires, additional batteries, or metal fasteners can introduce soft-iron effects that affect heading accuracy.
|
||||
- _The vehicle is operated in a region with significantly different magnetic characteristics._
|
||||
Large changes in latitude, longitude, or magnetic inclination can require re-estimation of offsets.
|
||||
- _QGroundControl reports magnetometer inconsistencies_.
|
||||
For example, if you see the error `mag sensors inconsistent`.
|
||||
- _Heading behavior does not match the vehicle’s observed orientation._
|
||||
Symptoms include drifting yaw, sudden heading jumps when attempting to fly straight, and toilet bowling
|
||||
- _QGroundControl_ sends the error `mag sensors inconsistent`.
|
||||
This indicates that multiple magnetometers are reporting different headings.
|
||||
|
||||
## Additional Calibration/Configuration
|
||||
|
||||
The process above will autodetect, [set default rotations](../advanced_config/parameter_reference.md#SENS_MAG_AUTOROT), calibrate, and prioritise, all available magnetometers.
|
||||
|
||||
@@ -77,13 +77,18 @@ Follow these steps:
|
||||
|
||||
1. **Set an Initial Scale**
|
||||
|
||||
Use a conservative starting point: set the CAS scale (`ASPD_SCALE_n`) slightly under 1.0 (for example 0.95).
|
||||
This biases the system toward over-speed rather than under-speed, reducing stall risk.
|
||||
Set the CAS scale (`ASPD_SCALE_n`) to 1.0 (the default value).
|
||||
When the scale is at exactly 1.0, PX4 automatically accelerates the learning process during the first 5 minutes of flight, allowing faster convergence to the correct scale value.
|
||||
|
||||
2. **Perform a Flight**
|
||||
|
||||
After takeoff, place the vehicle in loiter for about 15 minutes to allow the scale estimation to converge.
|
||||
|
||||
::: tip
|
||||
Flying in circles (loiter/hold mode) is important as the scale-validation algorithm requires the aircraft to pass through multiple heading segments (12 segments covering all compass directions).
|
||||
If these heading segments aren’t completed, PX4 cannot validate the estimated scale.
|
||||
:::
|
||||
|
||||
3. **Check Scale Convergence**
|
||||
|
||||
After the flight, review the estimated scale in logs.
|
||||
|
||||
@@ -39,3 +39,4 @@ The boards in this category are:
|
||||
- [Svehicle E2](../flight_controller/svehicle_e2.md)
|
||||
- [ThePeach FCC-K1](../flight_controller/thepeach_k1.md)
|
||||
- [ThePeach FCC-R1](../flight_controller/thepeach_r1.md)
|
||||
- [X-MAV AP-H743-R1](../flight_controller/x-mav_ap-h743r1.md)
|
||||
|
||||
@@ -74,7 +74,6 @@ This board supported in QGroundControl 4.0 and later.
|
||||
|
||||
## Availability
|
||||
|
||||
- [PX4 Autonomy Developer Kit](https://www.modalai.com/products/px4-autonomy-developer-kit)
|
||||
- [Starling 2](https://www.modalai.com/products/starling-2)
|
||||
- [Starling 2 MAX](https://www.modalai.com/products/starling-2-max)
|
||||
- [Sentinel Development Drone powered by VOXL 2](https://www.modalai.com/pages/sentinel)
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
# AP-H743-R1
|
||||
|
||||
<Badge type="tip" text="main (planned for: PX4 v1.17)" />
|
||||
|
||||
:::warning
|
||||
PX4 does not manufacture this (or any) autopilot.
|
||||
:::
|
||||
|
||||
The AP-H743-R1 is an advanced autopilot manufactured by X-MAV<sup>®</sup>.
|
||||
|
||||
The autopilot is recommended for commercial system integration, but is also suitable for academic research and any other applications.
|
||||
It brings you ultimate performance, stability, and reliability in every aspect.
|
||||
|
||||

|
||||
|
||||
::: info
|
||||
These flight controllers are [manufacturer supported](../flight_controller/autopilot_manufacturer_supported.md).
|
||||
:::
|
||||
|
||||
### Processors & Sensors
|
||||
|
||||
- FMU Processor: STM32H743VIT6
|
||||
- 32 Bit Arm® Cortex®-M7, 480MHz, 2MB flash memory, 1MB RAM
|
||||
- IO Processor: STM32F103
|
||||
- 32 Bit Arm® Cortex®-M3, 72MHz, 20KB SRAM
|
||||
- On-board sensors
|
||||
- Accel/Gyro: ICM-42688-P\*2(Version1), BMI270\*2(Version2)
|
||||
- Mag: IST8310
|
||||
- Barometer: DPS310(Version1),SPL06(Version2)
|
||||
|
||||
### Interfaces
|
||||
|
||||
- 15x PWM Servo Outputs
|
||||
- 1x Dedicated S.Bus Input
|
||||
- 3x TELEM Ports
|
||||
- 1x SERIAL4 Port
|
||||
- 2x GPS Ports
|
||||
- 1x USB Port (TYPE-C)
|
||||
- 3x I2C Bus Ports
|
||||
- 2x CAN Ports
|
||||
- 2x Power Input Ports
|
||||
- ADC Power Input
|
||||
- DroneCAN/UAVCAN Power Input
|
||||
- 2x Dedicated Debug Port
|
||||
- FMU Debug
|
||||
- IO Debug
|
||||
|
||||
## Purchase Channels
|
||||
|
||||
Order from [X-MAV](https://www.x-mav.cn/).
|
||||
|
||||
## Radio Control
|
||||
A Radio Control (RC) system is required if you want to manually control your vehicle (PX4 does not require a radio system for autonomous flight modes).
|
||||
|
||||
You will need to select a compatible transmitter/receiver and then bind them so that they communicate (read the instructions that come with your specific transmitter/receiver).
|
||||
|
||||
SBUS receivers connect to the SBUS-IN input port.
|
||||
CRSF receiver must be wired to a spare port (UART) on the Flight Controller. Then you can bind the transmitter and receiver together.
|
||||
|
||||
## Serial Port Mapping
|
||||
|
||||
| UART | Device | Port |
|
||||
| ------ | ---------- | ------------- |
|
||||
| USART1 | /dev/ttyS0 | GPS |
|
||||
| USART2 | /dev/ttyS1 | GPS2 |
|
||||
| USART3 | /dev/ttyS2 | TELEM1 |
|
||||
| UART4 | /dev/ttyS3 | TELEM2 |
|
||||
| UART7 | /dev/ttyS4 | TELEM3 |
|
||||
| UART8 | /dev/ttyS5 | SERIAL4 |
|
||||
|
||||
## PWM Output
|
||||
|
||||
The AP-H743-R1 flight controller supports up to 15 PWM outputs.
|
||||
The first 8 outputs (labelled M1 to M8) are controlled by a dedicated STM32F103 IOMCU controller.
|
||||
The remaining 7 outputs (labelled A1 to A7) are the "auxiliary" outputs.
|
||||
These are directly attached to the STM32H743 FMU controller .
|
||||
|
||||
The 15 PWM outputs are:
|
||||
|
||||
M1 - M8 are connected to the IOMCU.
|
||||
A1 - A7 are connected to the FMU.
|
||||
|
||||
M1 - M8 support DShot and are in 3 groups:
|
||||
|
||||
- M1, M2 in group 1
|
||||
- M3, M4 in group 2
|
||||
- M5, M6, M7, M8 in group 3
|
||||
|
||||
The 7 FMU PWM outputs are in 3 groups:
|
||||
|
||||
- A1 - A4 are in one group.
|
||||
- A5, A6 are in a 2nd group.
|
||||
- A7 is in a 3nd group.
|
||||
|
||||
Channels within the same group need to use the same output rate.
|
||||
If any channel in a group uses DShot then all channels in the group need to use DShot.
|
||||
|
||||
### Electrical data
|
||||
|
||||
- Voltage Ratings:
|
||||
- Max input voltage: 5.4V
|
||||
- USB Power Input: 4.75\~5.25V
|
||||
- Servo Rail Input: 0\~9.9V
|
||||
|
||||
## Battery Monitoring
|
||||
|
||||
The board has connectors for 2 power monitors.
|
||||
|
||||
- POWER1 -- ADC
|
||||
- POWER2 -- DroneCAN
|
||||
|
||||
The board is configure by default for a analog power monitor, and also has DroneCAN power monitor configured which is enabled.
|
||||
|
||||
## Building Firmware
|
||||
|
||||
To [build PX4](../dev_setup/building_px4.md) for this target, execute:
|
||||
|
||||
```sh
|
||||
make x-mav_ap-h743r1_default
|
||||
```
|
||||
|
||||
## Pinouts and Size
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Supported Platforms / Airframes
|
||||
|
||||
Any multirotor/airplane/rover or boat that can be controlled using normal RC servos or Futaba S-Bus servos.
|
||||
The complete set of supported configurations can be found in the [Airframe Reference](../airframes/airframe_reference.md).
|
||||
|
||||
## Debug Port
|
||||
|
||||
### SWD
|
||||
The [SWD interface](../debug/swd_debug.md) operate on the **FMU-DEBUG** port (`FMU-DEBUG`).
|
||||
|
||||
The debug port (`FMU-DEBUG`) uses a [JST SM04B-GHS-TB](https://www.digikey.com/en/products/detail/jst-sales-america-inc/SM04B-GHS-TB/807788) connector and has the following pinout:
|
||||
|
||||
| Pin | Signal | Volt |
|
||||
| ------- | -------------- | ----- |
|
||||
| 1 (red) | 5V+ | +5V |
|
||||
| 2 (blk) | FMU_SWDIO | +3.3V |
|
||||
| 3 (blk) | FMU_SWCLK | +3.3V |
|
||||
| 4 (blk) | GND | GND |
|
||||
@@ -162,6 +162,10 @@ Mission Items:
|
||||
- [MAV_CMD_OBLIQUE_SURVEY](https://mavlink.io/en/messages/common.html#MAV_CMD_OBLIQUE_SURVEY)
|
||||
- [MAV_CMD_DO_SET_CAMERA_ZOOM](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_CAMERA_ZOOM)
|
||||
- [MAV_CMD_DO_SET_CAMERA_FOCUS](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_SET_CAMERA_FOCUS)
|
||||
- [MAV_CMD_DO_AUTOTUNE_ENABLE](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_AUTOTUNE_ENABLE)
|
||||
- Disabling autotune by setting `param1` to zero is currently not supported. To abort autotune during a mission, switch to another flight mode.
|
||||
- Axis selection specified in the MAVLink message is ignored (`param2` must be set to 0).
|
||||
Instead, the axis bitmask defined by [`FW_AT_AXES`](../advanced_config/parameter_reference.md#FW_AT_AXES) is used.
|
||||
|
||||
GeoFence Definitions
|
||||
|
||||
|
||||
@@ -166,6 +166,9 @@ Mission Items:
|
||||
- [MAV_CMD_NAV_VTOL_TAKEOFF](https://mavlink.io/en/messages/common.html#MAV_CMD_NAV_VTOL_TAKEOFF)
|
||||
- `MAV_CMD_NAV_VTOL_TAKEOFF.param2` (transition heading) is ignored.
|
||||
Instead the heading to the next waypoint is used for the transition heading. <!-- at LEAST until PX4 v1.13: https://github.com/PX4/PX4-Autopilot/issues/12660 -->
|
||||
- [MAV_CMD_DO_AUTOTUNE_ENABLE](https://mavlink.io/en/messages/common.html#MAV_CMD_DO_AUTOTUNE_ENABLE)
|
||||
- Disabling autotune by setting `param1` to zero is currently not supported. To abort autotune during a mission, switch to another flight mode.
|
||||
- Axis selection specified in the MAVLink message is ignored (`param2` must be set to 0) .
|
||||
|
||||
GeoFence Definitions
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<Badge type="tip" text="PX4 v1.15" />
|
||||
|
||||
PX4 implements the MAVLink [Standard Modes Protocol](https://mavlink.io/en/services/standard_modes.md) from PX4 v1.15, with a corresponding implementation in QGroundControl Daily builds (and future release builds).
|
||||
PX4 implements the MAVLink [Standard Modes Protocol](https://mavlink.io/en/services/standard_modes.html) from PX4 v1.15, with a corresponding implementation in QGroundControl Daily builds (and future release builds).
|
||||
|
||||
The protocol allows you to discover all flight modes available to the vehicle, including PX4 External modes created using the [PX4 ROS 2 Control Interface](../ros2/px4_ros2_control_interface.md), and get or set the current mode.
|
||||
|
||||
|
||||
@@ -321,7 +321,7 @@ The configuration can be done using the [UXRCE-DDS parameters](../advanced_confi
|
||||
- [UXRCE_DDS_SYNCT](../advanced_config/parameter_reference.md#UXRCE_DDS_SYNCT): Bridge time synchronization enable.
|
||||
The uXRCE-DDS client module can synchronize the timestamp of the messages exchanged over the bridge.
|
||||
This is the default configuration. In certain situations, for example during [simulations](../ros2/user_guide.md#ros-gazebo-and-px4-time-synchronization), this feature may be disabled.
|
||||
- [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX): Index-based namespace definition
|
||||
- <Badge type="tip" text="PX4 v1.17" /> [`UXRCE_DDS_NS_IDX`](../advanced_config/parameter_reference.md#UXRCE_DDS_NS_IDX): Index-based namespace definition
|
||||
Setting this parameter to any value other than `-1` creates a namespace with the prefix `uav_` and the specified value, e.g. `uav_0`, `uav_1`, etc.
|
||||
See [namespace](#customizing-the-namespace) for methods to define richer or arbitrary namespaces.
|
||||
|
||||
@@ -540,7 +540,7 @@ Each (`topic`,`type`) pairs defines:
|
||||
4. The message type (`VehicleOdometry`, `VehicleStatus`, `OffboardControlMode`, etc.) and the ROS 2 package (`px4_msgs`) that is expected to provide the message definition.
|
||||
5. **(Optional)**: An additional `rate_limit` field (only for publication entries), which specifies the maximum rate (Hz) at which messages will be published on this topic by PX4 to ROS 2.
|
||||
If left unspecified, the maximum publication rate limit is set to 100 Hz.
|
||||
6. **(Optional)**: An additional `instance` field (only for publication entries), which lets you select which instance of a [multi-instance topic](./uorb.md#multi-instance) you want to be published to ROS 2.
|
||||
6. <Badge type="tip" text="main (planned for: PX4 v1.18)" /> **(Optional)**: An additional `instance` field (only for publication entries), which lets you select which instance of a [multi-instance topic](./uorb.md#multi-instance) you want to be published to ROS 2.
|
||||
If provided, this option changes the ROS 2 topic name of the advertised uORB topic appending the instance number: `fmu/out/[uorb topic name][instance]` (plus eventual namespace and message version).
|
||||
In the example above the final topic name would be `/fmu/out/vehicle_imu1`.
|
||||
|
||||
|
||||
@@ -899,6 +899,8 @@ fetching the latest mixing result and write them to PCA9685 at its scheduling ti
|
||||
It can do full 12bits output as duty-cycle mode, while also able to output precious pulse width
|
||||
that can be accepted by most ESCs and servos.
|
||||
|
||||
The I2C bus and address can be configured via parameters `PCA9685_EN_BUS` and `PCA9685_I2C_ADDR`, or via command line arguments.
|
||||
|
||||
### Examples
|
||||
|
||||
It is typically started with:
|
||||
|
||||
@@ -16,8 +16,6 @@ crsf_rc <command> [arguments...]
|
||||
start
|
||||
[-d <val>] RC device
|
||||
values: <file:dev>, default: /dev/ttyS3
|
||||
[-b <val>] RC baudrate
|
||||
default: 420000
|
||||
|
||||
inject Inject frame data bytes (for testing)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Configurable overrides by (external) modes or mode executors
|
||||
```c
|
||||
# Configurable overrides by (external) modes or mode executors
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
uint32 MESSAGE_VERSION = 1
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
@@ -15,7 +15,7 @@ bool disable_auto_disarm # Prevent the drone from automatically disarmin
|
||||
|
||||
bool defer_failsafes # Defer all failsafes that can be deferred (until the flag is cleared)
|
||||
int16 defer_failsafes_timeout_s # Maximum time a failsafe can be deferred. 0 = system default, -1 = no timeout
|
||||
|
||||
bool disable_auto_set_home # Prevent the drone from automatically setting the home position on arm or takeoff
|
||||
|
||||
int8 SOURCE_TYPE_MODE = 0
|
||||
int8 SOURCE_TYPE_MODE_EXECUTOR = 1
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# ConfigOverridesV0 (UORB message)
|
||||
|
||||
Configurable overrides by (external) modes or mode executors
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/px4_msgs_old/msg/ConfigOverridesV0.msg)
|
||||
|
||||
```c
|
||||
# Configurable overrides by (external) modes or mode executors
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
bool disable_auto_disarm # Prevent the drone from automatically disarming after landing (if configured)
|
||||
|
||||
bool defer_failsafes # Defer all failsafes that can be deferred (until the flag is cleared)
|
||||
int16 defer_failsafes_timeout_s # Maximum time a failsafe can be deferred. 0 = system default, -1 = no timeout
|
||||
|
||||
|
||||
int8 SOURCE_TYPE_MODE = 0
|
||||
int8 SOURCE_TYPE_MODE_EXECUTOR = 1
|
||||
int8 source_type
|
||||
|
||||
uint8 source_id # ID depending on source_type
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 4
|
||||
|
||||
# TOPICS config_overrides config_overrides_request
|
||||
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
# GainCompression (UORB message)
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/GainCompression.msg)
|
||||
|
||||
```c
|
||||
uint64 timestamp # Time since system start (microseconds)
|
||||
|
||||
float32[3] compression_gains # [-] [@frame FRD] [@range 0, 1] Multiplicative gain to modify the output of the controller per axis
|
||||
float32[3] spectral_damper_hpf # [-] [@frame FRD] Squared output of spectral damper high-pass filter
|
||||
float32[3] spectral_damper_out # [-] [@frame FRD] Spectral damper output squared
|
||||
|
||||
```
|
||||
@@ -1,11 +1,9 @@
|
||||
# RegisterExtComponentReply (UORB message)
|
||||
|
||||
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/versioned/RegisterExtComponentReply.msg)
|
||||
|
||||
```c
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
uint32 MESSAGE_VERSION = 1
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
@@ -19,6 +17,8 @@ int8 arming_check_id # arming check registration ID (-1 if invalid)
|
||||
int8 mode_id # assigned mode ID (-1 if invalid)
|
||||
int8 mode_executor_id # assigned mode executor ID (-1 if invalid)
|
||||
|
||||
bool not_user_selectable # mode cannot be selected by the user
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 2
|
||||
|
||||
```
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# RegisterExtComponentReplyV0 (UORB message)
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/px4_msgs_old/msg/RegisterExtComponentReplyV0.msg)
|
||||
|
||||
```c
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint64 request_id # ID from the request
|
||||
char[25] name # name from the request
|
||||
|
||||
uint16 px4_ros2_api_version
|
||||
|
||||
bool success
|
||||
int8 arming_check_id # arming check registration ID (-1 if invalid)
|
||||
int8 mode_id # assigned mode ID (-1 if invalid)
|
||||
int8 mode_executor_id # assigned mode executor ID (-1 if invalid)
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 2
|
||||
|
||||
```
|
||||
@@ -7,7 +7,7 @@ Request to register an external component
|
||||
```c
|
||||
# Request to register an external component
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
uint32 MESSAGE_VERSION = 1
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
@@ -26,7 +26,7 @@ bool register_mode_executor # registering an executor also requires a mod
|
||||
bool enable_replace_internal_mode # set to true if an internal mode should be replaced
|
||||
uint8 replace_internal_mode # vehicle_status::NAVIGATION_STATE_*
|
||||
bool activate_mode_immediately # switch to the registered mode (can only be set in combination with an executor)
|
||||
|
||||
bool not_user_selectable # mode cannot be selected by the user
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 2
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# RegisterExtComponentRequestV0 (UORB message)
|
||||
|
||||
Request to register an external component
|
||||
|
||||
[source file](https://github.com/PX4/PX4-Autopilot/blob/main/msg/px4_msgs_old/msg/RegisterExtComponentRequestV0.msg)
|
||||
|
||||
```c
|
||||
# Request to register an external component
|
||||
|
||||
uint32 MESSAGE_VERSION = 0
|
||||
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
|
||||
uint64 request_id # ID, set this to a random value
|
||||
char[25] name # either the requested mode name, or component name
|
||||
|
||||
uint16 LATEST_PX4_ROS2_API_VERSION = 1 # API version compatibility. Increase this on a breaking semantic change. Changes to any message field are detected separately and do not require an API version change.
|
||||
|
||||
uint16 px4_ros2_api_version # Set to LATEST_PX4_ROS2_API_VERSION
|
||||
|
||||
# Components to be registered
|
||||
bool register_arming_check
|
||||
bool register_mode # registering a mode also requires arming_check to be set
|
||||
bool register_mode_executor # registering an executor also requires a mode to be registered (which is the owned mode by the executor)
|
||||
|
||||
bool enable_replace_internal_mode # set to true if an internal mode should be replaced
|
||||
uint8 replace_internal_mode # vehicle_status::NAVIGATION_STATE_*
|
||||
bool activate_mode_immediately # switch to the registered mode (can only be set in combination with an executor)
|
||||
|
||||
|
||||
uint8 ORB_QUEUE_LENGTH = 2
|
||||
|
||||
```
|
||||
@@ -69,6 +69,7 @@ uint16 VEHICLE_CMD_DO_PARACHUTE=208 # Mission command to trigger a parachute. |a
|
||||
uint16 VEHICLE_CMD_DO_MOTOR_TEST=209 # Motor test command. |Instance (@range 1, )|throttle type|throttle|timeout [s]|Motor count|Test order|Unused|
|
||||
uint16 VEHICLE_CMD_DO_INVERTED_FLIGHT=210 # Change to/from inverted flight. |inverted (0=normal, 1=inverted)|Unused|Unused|Unused|Unused|Unused|Unused|
|
||||
uint16 VEHICLE_CMD_DO_GRIPPER = 211 # Command to operate a gripper.
|
||||
uint16 VEHICLE_CMD_DO_AUTOTUNE_ENABLE = 212 # Enable autotune module. |1 to enable|Unused|Unused|Unused|Unused|Unused|Unused|
|
||||
uint16 VEHICLE_CMD_DO_SET_CAM_TRIGG_INTERVAL=214 # Mission command to set TRIG_INTERVAL for this flight. |[m] Camera trigger distance|Shutter integration time (ms)|Unused|Unused|Unused|Unused|Unused|
|
||||
uint16 VEHICLE_CMD_DO_MOUNT_CONTROL_QUAT=220 # Mission command to control a camera or antenna mount, using a quaternion as reference. |q1 - quaternion param #1, w (1 in null-rotation)|q2 - quaternion param #2, x (0 in null-rotation)|q3 - quaternion param #3, y (0 in null-rotation)|q4 - quaternion param #4, z (0 in null-rotation)|Unused|Unused|Unused|
|
||||
uint16 VEHICLE_CMD_DO_GUIDED_MASTER=221 # Set id of master controller. |System ID|Component ID|Unused|Unused|Unused|Unused|Unused|
|
||||
|
||||
@@ -140,6 +140,7 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
|
||||
- [FollowTargetEstimator](FollowTargetEstimator.md)
|
||||
- [FollowTargetStatus](FollowTargetStatus.md)
|
||||
- [FuelTankStatus](FuelTankStatus.md)
|
||||
- [GainCompression](GainCompression.md)
|
||||
- [GeneratorStatus](GeneratorStatus.md)
|
||||
- [GeofenceResult](GeofenceResult.md)
|
||||
- [GeofenceStatus](GeofenceStatus.md)
|
||||
@@ -305,9 +306,12 @@ Graphs showing how these are used [can be found here](../middleware/uorb_graph.m
|
||||
- [ArmingCheckReplyV0](ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](ArmingCheckRequestV0.md) — Arming check request.
|
||||
- [BatteryStatusV0](BatteryStatusV0.md) — Battery status
|
||||
- [ConfigOverridesV0](ConfigOverridesV0.md) — Configurable overrides by (external) modes or mode executors
|
||||
- [EventV0](EventV0.md) — this message is required here in the msg_old folder because other msg are depending on it
|
||||
Events interface
|
||||
- [HomePositionV0](HomePositionV0.md) — GPS home position in WGS84 coordinates.
|
||||
- [RegisterExtComponentReplyV0](RegisterExtComponentReplyV0.md)
|
||||
- [RegisterExtComponentRequestV0](RegisterExtComponentRequestV0.md) — Request to register an external component
|
||||
- [VehicleAttitudeSetpointV0](VehicleAttitudeSetpointV0.md)
|
||||
- [VehicleLocalPositionV0](VehicleLocalPositionV0.md) — Fused local position in NED.
|
||||
The coordinate system origin is the vehicle position at the time when the EKF2-module was started.
|
||||
|
||||
@@ -55,6 +55,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide).
|
||||
### Sensors
|
||||
|
||||
- Add [sbgECom INS driver](../sensor/sbgecom.md) ([PX4-Autopilot#24137](https://github.com/PX4/PX4-Autopilot/pull/24137))
|
||||
- Quick magnetometer calibration now supports specifying an arbitrary initial heading ([PX4-Autopilot#24637](https://github.com/PX4/PX4-Autopilot/pull/24637))
|
||||
|
||||
### Simulation
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
- [정압 축적](advanced_config/static_pressure_buildup.md)
|
||||
- [Flying (Basics)](flying/basic_flying_mc.md)
|
||||
- [완성 기체](complete_vehicles_mc/index.md)
|
||||
- [ModalAI Starling (PX4 Dev Kit)](complete_vehicles_mc/modalai_starling.md)
|
||||
- [ModalAI Starling](complete_vehicles_mc/modalai_starling.md)
|
||||
- [PX4 비전 키트](complete_vehicles_mc/px4_vision_kit.md)
|
||||
- [마인드레이서 BNF & RTF](complete_vehicles_mc/mindracer_BNF_RTF.md)
|
||||
- [마인드레이서 210](complete_vehicles_mc/mindracer210.md)
|
||||
@@ -56,11 +56,14 @@
|
||||
- [DJI F450 (CUAV v5 nano)](frames_multicopter/dji_f450_cuav_5nano.md)
|
||||
|
||||
- [Planes (Fixed-Wing)](frames_plane/index.md)
|
||||
- [Features](features_fw/index.md)
|
||||
- [Gain compression](features_fw/gain_compression.md)
|
||||
- [Assembly](assembly/assembly_fw.md)
|
||||
- [Config/Tuning](config_fw/index.md)
|
||||
- [Auto-tune](config/autotune_fw.md)
|
||||
- [Rate/Attitude Controller Tuning Guide](config_fw/pid_tuning_guide_fixedwing.md)
|
||||
- [Altitude/Position Controller Tuning Guide](config_fw/position_tuning_guide_fixedwing.md)
|
||||
- [Airspeed Scale Estimate Handling](config_fw/airspeed_scale_handling.md)
|
||||
- [Weight & Altitude Tuning](config_fw/weight_and_altitude_tuning.md)
|
||||
- [Trimming Guide](config_fw/trimming_guide_fixedwing.md)
|
||||
- [Flying (Basics)](flying/basic_flying_fw.md)
|
||||
@@ -191,6 +194,7 @@
|
||||
- [SVehicle E2](flight_controller/svehicle_e2.md)
|
||||
- [ThePeach FCC-K1](flight_controller/thepeach_k1.md)
|
||||
- [ThePeach FCC-R1](flight_controller/thepeach_r1.md)
|
||||
- [AP-H743-R1](flight_controller/x-mav_ap-h743r1.md)
|
||||
- [Experimental Autopilots](flight_controller/autopilot_experimental.md)
|
||||
- [BeagleBone Blue](flight_controller/beaglebone_blue.md)
|
||||
- [Raspberry Pi 2/3 Navio2](flight_controller/raspberry_pi_navio2.md)
|
||||
@@ -243,18 +247,22 @@
|
||||
- [TFSlot Airspeed Sensor](sensor/airspeed_tfslot.md)
|
||||
- [Barometers](sensor/barometer.md)
|
||||
- [거리 센서](sensor/rangefinders.md)
|
||||
- [Ainstein US-D1 Standard Radar Altimeter](sensor/ulanding_radar.md)
|
||||
- [ARK DIST SR (CAN/UART)](dronecan/ark_dist.md)
|
||||
- [ARK DIST MR (CAN/UART)](dronecan/ark_dist_mr.md)
|
||||
- [Benewake TFmini 라이다](sensor/tfmini.md)
|
||||
- [LeddarOne 라이다](sensor/leddar_one.md)
|
||||
- [Lidar-Lite](sensor/lidar_lite.md)
|
||||
- [Lightware Lidars (SF/LW)](sensor/sfxx_lidar.md)
|
||||
- [Lightware SF45 Rotary Lidar](sensor/sf45_rotating_lidar.md)
|
||||
- [Ainstein US-D1 Standard Radar Altimeter](sensor/ulanding_radar.md)
|
||||
- [LeddarOne 라이다](sensor/leddar_one.md)
|
||||
- [Benewake TFmini 라이다](sensor/tfmini.md)
|
||||
- [Lidar-Lite](sensor/lidar_lite.md)
|
||||
- [TeraRanger ](sensor/teraranger.md)
|
||||
- [✘ Lanbao PSK-CM8JL65-CC5](sensor/cm8jl65_ir_distance_sensor.md)
|
||||
- [Avionics Anonymous Laser Altimeter UAVCAN Interface (CAN)](dronecan/avanon_laser_interface.md)
|
||||
- [GNSS (GPS)](gps_compass/index.md)
|
||||
- [ARK GPS (CAN)](dronecan/ark_gps.md)
|
||||
- [ARK DAN GPS](gps_compass/ark_dan_gps.md)
|
||||
- [ARK SAM GPS](gps_compass/ark_sam_gps.md)
|
||||
- [ARK SAM GPS MINI](gps_compass/ark_sam_gps_mini.md)
|
||||
- [ARK TESEO GPS](dronecan/ark_teseo_gps.md)
|
||||
- [CUAV NEO 3 GPS](gps_compass/gps_cuav_neo_3.md)
|
||||
- [CUAV NEO 3 Pro GPS (CAN)](gps_compass/gps_cuav_neo_3pro.md)
|
||||
@@ -266,6 +274,8 @@
|
||||
- [Sky-Drones SmartAP GPS](gps_compass/gps_smartap.md)
|
||||
- [RTK GNSS](gps_compass/rtk_gps.md)
|
||||
- [ARK RTK GPS (CAN)](dronecan/ark_rtk_gps.md)
|
||||
- [ARK RTK GPS L1 L5 (CAN)](dronecan/ark_rtk_gps_l1_l2.md)
|
||||
- [ARK X20 RTK GPS (CAN)](dronecan/ark_x20_rtk_gps.md)
|
||||
- [ARK MOSAIC-X5 RTK GPS (CAN)](dronecan/ark_mosaic__rtk_gps.md)
|
||||
- [RTK GPS Heading with Dual u-blox F9P](gps_compass/u-blox_f9p_heading.md)
|
||||
- [CUAV C-RTK](gps_compass/rtk_gps_cuav_c-rtk.md)
|
||||
@@ -350,13 +360,14 @@
|
||||
- [Battery Estimation Tuning](config/battery.md)
|
||||
- [Battery Chemistry Overview](power_systems/battery_chemistry.md)
|
||||
- [Power Modules/PDB](power_module/index.md)
|
||||
- [ARK PAB Power Module](power_module/ark_pab_power_module.md)
|
||||
- [ARK 12S PAB Power Module](power_module/ark_12s_pab_power_module.md)
|
||||
- [ARK 12S Payload Power Module](power_module/ark_12s_payload_power_module.md)
|
||||
- [CUAV HV 전원 모듈](power_module/cuav_hv_pm.md)
|
||||
- [CUAV CAN 전원 모듈](dronecan/cuav_can_pmu.md)
|
||||
- [Holybro PM02](power_module/holybro_pm02.md)
|
||||
- [Holybro PM07](power_module/holybro_pm07_pixhawk4_power_module.md)
|
||||
- [Holybro PM06 V2](power_module/holybro_pm06_pixhawk4mini_power_module.md)
|
||||
- [ARK PAB Power Module](power_module/ark_pab_power_module.md)
|
||||
- [ARK 12S PAB Power Module](power_module/ark_12s_pab_power_module.md)
|
||||
- [Holybro PM02D (digital)](power_module/holybro_pm02d.md)
|
||||
- [Holybro PM03D (digital)](power_module/holybro_pm03d.md)
|
||||
- [Pomegranate Systems Power Module](dronecan/pomegranate_systems_pm.md)
|
||||
@@ -602,6 +613,7 @@
|
||||
- [FollowTargetEstimator](msg_docs/FollowTargetEstimator.md)
|
||||
- [FollowTargetStatus](msg_docs/FollowTargetStatus.md)
|
||||
- [FuelTankStatus](msg_docs/FuelTankStatus.md)
|
||||
- [GainCompression](msg_docs/GainCompression.md)
|
||||
- [GeneratorStatus](msg_docs/GeneratorStatus.md)
|
||||
- [GeofenceResult](msg_docs/GeofenceResult.md)
|
||||
- [GeofenceStatus](msg_docs/GeofenceStatus.md)
|
||||
@@ -692,8 +704,6 @@
|
||||
- [RoverSpeedStatus](msg_docs/RoverSpeedStatus.md)
|
||||
- [RoverSteeringSetpoint](msg_docs/RoverSteeringSetpoint.md)
|
||||
- [RoverThrottleSetpoint](msg_docs/RoverThrottleSetpoint.md)
|
||||
- [RoverVelocitySetpoint](msg_docs/RoverVelocitySetpoint.md)
|
||||
- [RoverVelocityStatus](msg_docs/RoverVelocityStatus.md)
|
||||
- [Rpm](msg_docs/Rpm.md)
|
||||
- [RtlStatus](msg_docs/RtlStatus.md)
|
||||
- [RtlTimeEstimate](msg_docs/RtlTimeEstimate.md)
|
||||
@@ -715,6 +725,7 @@
|
||||
- [SensorOpticalFlow](msg_docs/SensorOpticalFlow.md)
|
||||
- [SensorPreflightMag](msg_docs/SensorPreflightMag.md)
|
||||
- [SensorSelection](msg_docs/SensorSelection.md)
|
||||
- [SensorTemp](msg_docs/SensorTemp.md)
|
||||
- [SensorUwb](msg_docs/SensorUwb.md)
|
||||
- [SensorsStatus](msg_docs/SensorsStatus.md)
|
||||
- [SensorsStatusImu](msg_docs/SensorsStatusImu.md)
|
||||
@@ -753,8 +764,11 @@
|
||||
- [ArmingCheckReplyV0](msg_docs/ArmingCheckReplyV0.md)
|
||||
- [ArmingCheckRequestV0](msg_docs/ArmingCheckRequestV0.md)
|
||||
- [BatteryStatusV0](msg_docs/BatteryStatusV0.md)
|
||||
- [ConfigOverridesV0](msg_docs/ConfigOverridesV0.md)
|
||||
- [EventV0](msg_docs/EventV0.md)
|
||||
- [HomePositionV0](msg_docs/HomePositionV0.md)
|
||||
- [RegisterExtComponentReplyV0](msg_docs/RegisterExtComponentReplyV0.md)
|
||||
- [RegisterExtComponentRequestV0](msg_docs/RegisterExtComponentRequestV0.md)
|
||||
- [VehicleAttitudeSetpointV0](msg_docs/VehicleAttitudeSetpointV0.md)
|
||||
- [VehicleLocalPositionV0](msg_docs/VehicleLocalPositionV0.md)
|
||||
- [VehicleStatusV0](msg_docs/VehicleStatusV0.md)
|
||||
@@ -785,6 +799,7 @@
|
||||
- [Rpm Sensor](modules/modules_driver_rpm_sensor.md)
|
||||
- [Radio Control](modules/modules_driver_radio_control.md)
|
||||
- [Transponder](modules/modules_driver_transponder.md)
|
||||
- [adc](modules/modules_driver_adc.md)
|
||||
- [추정기](modules/modules_estimator.md)
|
||||
- [시뮬레이션](modules/modules_simulation.md)
|
||||
- [시스템](modules/modules_system.md)
|
||||
|
||||
@@ -57,11 +57,14 @@
|
||||
- [DJI F450 (CUAV v5 nano)](/frames_multicopter/dji_f450_cuav_5nano.md)
|
||||
|
||||
- [Planes (Fixed-Wing)](/frames_plane/index.md)
|
||||
- [Features](/features_fw/index.md)
|
||||
- [Gain compression](/features_fw/gain_compression.md)
|
||||
- [Assembly](/assembly/assembly_fw.md)
|
||||
- [Config/Tuning](/config_fw/index.md)
|
||||
- [Auto-tune](/config/autotune_fw.md)
|
||||
- [Rate/Attitude Controller Tuning Guide](/config_fw/pid_tuning_guide_fixedwing.md)
|
||||
- [Altitude/Position Controller Tuning Guide](/config_fw/position_tuning_guide_fixedwing.md)
|
||||
- [Airspeed Scale Estimate Handling](/config_fw/airspeed_scale_handling.md)
|
||||
- [Weight & Altitude Tuning](/config_fw/weight_and_altitude_tuning.md)
|
||||
- [Trimming Guide](/config_fw/trimming_guide_fixedwing.md)
|
||||
- [Flying (Basics)](/flying/basic_flying_fw.md)
|
||||
@@ -183,11 +186,13 @@
|
||||
- [Wiring Quickstart](/assembly/quick_start_durandal.md)
|
||||
- [Holybro Pix32 v5](/flight_controller/holybro_pix32_v5.md)
|
||||
- [Wiring Quickstart](/assembly/quick_start_holybro_pix32_v5.md)
|
||||
- [MicoAir H743 Lite](/flight_controller/micoair743-lite.md)
|
||||
- [ModalAI VOXL 2](/flight_controller/modalai_voxl_2.md)
|
||||
- [mRo Control Zero F7](/flight_controller/mro_control_zero_f7.md)
|
||||
- [Radiolink PIX6](/flight_controller/radiolink_pix6.md)
|
||||
- [Sky-Drones AIRLink](/flight_controller/airlink.md)
|
||||
- [SPRacing SPRacingH7EXTREME](/flight_controller/spracingh7extreme.md)
|
||||
- [SVehicle E2](/flight_controller/svehicle_e2.md)
|
||||
- [ThePeach FCC-K1](/flight_controller/thepeach_k1.md)
|
||||
- [ThePeach FCC-R1](/flight_controller/thepeach_r1.md)
|
||||
- [Experimental Autopilots](/flight_controller/autopilot_experimental.md)
|
||||
@@ -287,6 +292,7 @@
|
||||
- [CubePilot Here+ (Discontined)](/gps_compass/rtk_gps_hex_hereplus.md)
|
||||
- [INS (Inertial Navigation/GNSS)](/sensor/inertial_navigation_systems.md)
|
||||
- [InertialLabs](/sensor/inertiallabs.md)
|
||||
- [MicroStrain](/sensor/microstrain.md)
|
||||
- [sbgECom](/sensor/sbgecom.md)
|
||||
- [VectorNav](/sensor/vectornav.md)
|
||||
- [광류 센서](/sensor/optical_flow.md)
|
||||
@@ -503,6 +509,7 @@
|
||||
- [UART/Serial 포트](/uart/index.md)
|
||||
- [포트 설정 가능 시리얼 드라이버](/uart/user_configurable_serial_driver.md)
|
||||
- [RTK GPS (통합)](/advanced/rtk_gps.md)
|
||||
- [PPS Time Synchronization](/advanced/pps_time_sync.md)
|
||||
- [미들웨어](/middleware/index.md)
|
||||
- [uORB 메시지 전송](/middleware/uorb.md)
|
||||
- [uORB 그라프](/middleware/uorb_graph.md)
|
||||
@@ -689,8 +696,6 @@
|
||||
- [RoverSpeedStatus](/msg_docs/RoverSpeedStatus.md)
|
||||
- [RoverSteeringSetpoint](/msg_docs/RoverSteeringSetpoint.md)
|
||||
- [RoverThrottleSetpoint](/msg_docs/RoverThrottleSetpoint.md)
|
||||
- [RoverVelocitySetpoint](/msg_docs/RoverVelocitySetpoint.md)
|
||||
- [RoverVelocityStatus](/msg_docs/RoverVelocityStatus.md)
|
||||
- [Rpm](/msg_docs/Rpm.md)
|
||||
- [RtlStatus](/msg_docs/RtlStatus.md)
|
||||
- [RtlTimeEstimate](/msg_docs/RtlTimeEstimate.md)
|
||||
@@ -702,6 +707,7 @@
|
||||
- [SensorCombined](/msg_docs/SensorCombined.md)
|
||||
- [SensorCorrection](/msg_docs/SensorCorrection.md)
|
||||
- [SensorGnssRelative](/msg_docs/SensorGnssRelative.md)
|
||||
- [SensorGnssStatus](/msg_docs/SensorGnssStatus.md)
|
||||
- [SensorGps](/msg_docs/SensorGps.md)
|
||||
- [SensorGyro](/msg_docs/SensorGyro.md)
|
||||
- [SensorGyroFft](/msg_docs/SensorGyroFft.md)
|
||||
@@ -711,6 +717,7 @@
|
||||
- [SensorOpticalFlow](/msg_docs/SensorOpticalFlow.md)
|
||||
- [SensorPreflightMag](/msg_docs/SensorPreflightMag.md)
|
||||
- [SensorSelection](/msg_docs/SensorSelection.md)
|
||||
- [SensorTemp](/msg_docs/SensorTemp.md)
|
||||
- [SensorUwb](/msg_docs/SensorUwb.md)
|
||||
- [SensorsStatus](/msg_docs/SensorsStatus.md)
|
||||
- [SensorsStatusImu](/msg_docs/SensorsStatusImu.md)
|
||||
@@ -763,6 +770,7 @@
|
||||
- [Standard Modes Protocol](/mavlink/standard_modes.md)
|
||||
- [uXRCE-DDS (PX4-ROS 2/DDS Bridge)](/middleware/uxrce_dds.md)
|
||||
- [UORB Bridged to ROS 2](/middleware/dds_topics.md)
|
||||
- [Zenoh (PX4 ROS 2)](/middleware/zenoh.md)
|
||||
- [모듈과 명령어](/modules/modules_main.md)
|
||||
- [자동 튜닝](/modules/modules_autotune.md)
|
||||
- [명령어](/modules/modules_command.md)
|
||||
@@ -780,6 +788,7 @@
|
||||
- [Rpm Sensor](/modules/modules_driver_rpm_sensor.md)
|
||||
- [Radio Control](/modules/modules_driver_radio_control.md)
|
||||
- [Transponder](/modules/modules_driver_transponder.md)
|
||||
- [adc](/modules/modules_driver_adc.md)
|
||||
- [추정기](/modules/modules_estimator.md)
|
||||
- [시뮬레이션](/modules/modules_simulation.md)
|
||||
- [시스템](/modules/modules_system.md)
|
||||
|
||||
@@ -131,7 +131,7 @@ The on-screen gimbal control can be used to move/test a connected MAVLink camera
|
||||
|
||||
2. Open QGroundControl and enable the on-screen camera control (Application settings).
|
||||
|
||||

|
||||

|
||||
|
||||
3. Make sure the vehicle is armed and flying, e.g. by entering with `commander takeoff`.
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ On Windows, one option is to use _Melody Master_ within _Dosbox_.
|
||||
7. 음악을 저장할 준비가 끝나면:
|
||||
- Press **F2** to give the tune a name and save it in the _/Music_ sub folder of your Melody Master installation.
|
||||
- Press **F7**, the scroll down the list of output formats on the right to get to ANSI.
|
||||
The file will be exported to the _root_ of the Melody Master directory (with the same name and a file-type specific extension).
|
||||
The file will be exported to the _root_ of the Melody Master directory (with the same name and a file-type specific extension).
|
||||
|
||||
8. 파일을 여십시오.
|
||||
출력 내용은 다음과 같습니다:
|
||||
|
||||
@@ -23,7 +23,7 @@ You can locate the parameters in QGroundControl as shown below:
|
||||
1. Open QGroundControl menu: **Settings > Parameters > Sensor Calibration**.
|
||||
2. The parameters as located in the section as shown below (or you can search for them):
|
||||
|
||||

|
||||

|
||||
|
||||
## Parameter Summary
|
||||
|
||||
|
||||
@@ -10,36 +10,13 @@ By default, the [Missing Data](#missing-data-check), [Data Stuck](#data-stuck-ch
|
||||
You can configure which checks are active using the [ASPD_DO_CHECKS](#aspd_do_checks_table) parameter.
|
||||
:::
|
||||
|
||||
## Airspeed in PX4
|
||||
|
||||
PX4 handles multiple types of airspeed:
|
||||
|
||||
- **IAS (Indicated Airspeed):** The raw measurement from the airspeed sensor, directly influenced by sensor characteristics and installation effects (e.g., pitot-static errors).
|
||||
|
||||
- **CAS (Calibrated Airspeed):** IAS corrected for sensor-specific and installation-related errors.
|
||||
|
||||
- **EAS (Equivalent Airspeed):** _Not explicitly handled by PX4_ - Calibrated airspeed corrected for compressibility effects.
|
||||
While PX4 does not currently model EAS separately, this correction is negligible at low speeds and altitudes, so EAS is treated as equivalent to CAS for simplicity.
|
||||
|
||||
- **TAS (True Airspeed):** CAS adjusted for atmospheric effects such as air pressure and temperature (i.e., altitude and atmospheric conditions).
|
||||
|
||||
The standard conversion chain used in PX4 is: `IAS → CAS (= EAS) → TAS`.
|
||||
|
||||
## CAS Scale Estimation
|
||||
|
||||
PX4 estimates the IAS to CAS scale (referred to as the CAS scale) during flight using GNSS ground speed and wind estimation.
|
||||
To compute the final TAS, standard environment conversions are applied (CAS → TAS).
|
||||
|
||||
This CAS scaling plays an important role in keeping the [innovation check](#innovation-check) reliable, since a well-estimated CAS is key to spotting inconsistencies between measured and predicted airspeed.
|
||||
Calibrated Airspeed (CAS) is the measured Indicated Airspeed (IAS) scaled to correct for sensor-specific and installation-related errors.
|
||||
CAS scaling plays an important role in keeping the [innovation check](#innovation-check) reliable, since a well-estimated CAS is key to spotting inconsistencies between measured and predicted airspeed.
|
||||
If the estimated CAS scale is inaccurate, it can mask real airspeed faults or trigger false positives.
|
||||
|
||||
If you observe that the CAS scale estimate is consistently off, or if it is converging too slowly, you can manually set it using [ASPD_SCALE_n](#aspd_scale_n_table) (where `n` is the sensor number).
|
||||
[ASPD_SCALE_APPLY](#aspd_scale_apply_table) can be used to configure when/if the estimated scale is applied.
|
||||
|
||||
:::info
|
||||
For a quick manual CAS scale estimate, compare groundspeed minus windspeed (from the [VehicleLocalPosition](../msg_docs/VehicleLocalPosition.md) and [Wind](../msg_docs/Wind.md) messages, respectively) to indicated airspeed values (in the [Airspeed](../msg_docs/Airspeed.md) message).
|
||||
The ratio of indicated airspeed to groundspeed minus windspeed can provide a reasonable starting estimate for [ASPD_SCALE_n](#aspd_scale_n_table).
|
||||
:::
|
||||
If you observe that the CAS scale estimate is consistently off, or if it is converging too slowly, follow the steps outlined in [Airspeed Scale Handling](../config_fw/airspeed_scale_handling.md#recommended-first-flight-process).
|
||||
|
||||
## Validation Checks
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ You can enable this key in your own custom firmware if needed.
|
||||
|
||||
2. [Update the Firmware](../config/firmware.md#custom) with an image containing the new/desired bootloader.
|
||||
|
||||
::: info
|
||||
The updated bootloader might be included the default firmware for your board or supplied in custom firmware.
|
||||
::: info
|
||||
The updated bootloader might be included the default firmware for your board or supplied in custom firmware.
|
||||
|
||||
:::
|
||||
|
||||
@@ -47,7 +47,7 @@ You can enable this key in your own custom firmware if needed.
|
||||
4. [Find and enable](../advanced_config/parameters.md) the parameter [SYS_BL_UPDATE](../advanced_config/parameter_reference.md#SYS_BL_UPDATE).
|
||||
|
||||
5. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.).
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
|
||||
Generally at this point you may then want to [update the firmware](../config/firmware.md) again using the correct/newly installed bootloader.
|
||||
|
||||
@@ -89,81 +89,81 @@ The following steps explain how you can "manually" update the bootloader using a
|
||||
1. Get a binary containing the bootloader (either from dev team or [build it yourself](#building-the-px4-bootloader)).
|
||||
|
||||
2. Get a [Debug Probe](../debug/swd_debug.md#debug-probes-for-px4-hardware).
|
||||
Connect the probe your PC via USB and setup the `gdbserver`.
|
||||
Connect the probe your PC via USB and setup the `gdbserver`.
|
||||
|
||||
3. Go into the directory containing the binary and run the command for your target bootloader in the terminal:
|
||||
|
||||
- FMUv6X
|
||||
- FMUv6X
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6x_bootloader.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6x_bootloader.elf
|
||||
```
|
||||
|
||||
- FMUv6X-RT
|
||||
- FMUv6X-RT
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6xrt_bootloader.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4_fmu-v6xrt_bootloader.elf
|
||||
```
|
||||
|
||||
- FMUv5
|
||||
- FMUv5
|
||||
|
||||
```sh
|
||||
arm-none-eabi-gdb px4fmuv5_bl.elf
|
||||
```
|
||||
```sh
|
||||
arm-none-eabi-gdb px4fmuv5_bl.elf
|
||||
```
|
||||
|
||||
::: info
|
||||
H7 Bootloaders from [PX4/PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) are named with pattern `*._bootloader.elf`.
|
||||
Bootloaders from [PX4/PX4-Bootloader](https://github.com/PX4/PX4-Bootloader) are named with the pattern `*_bl.elf`.
|
||||
::: info
|
||||
H7 Bootloaders from [PX4/PX4-Autopilot](https://github.com/PX4/PX4-Autopilot) are named with pattern `*._bootloader.elf`.
|
||||
Bootloaders from [PX4/PX4-Bootloader](https://github.com/PX4/PX4-Bootloader) are named with the pattern `*_bl.elf`.
|
||||
|
||||
:::
|
||||
|
||||
4. The _gdb terminal_ appears and it should display (something like) the following output:
|
||||
|
||||
```sh
|
||||
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
Type "show copying" and "show warranty" for details.
|
||||
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
|
||||
Type "show configuration" for configuration details.
|
||||
For bug reporting instructions, please see:
|
||||
<https://www.sourceware.org/gdb/bugs/>.
|
||||
Find the GDB manual and other documentation resources online at:
|
||||
<https://www.sourceware.org/gdb/documentation/>.
|
||||
For help, type "help".
|
||||
Type "apropos word" to search for commands related to "word"...
|
||||
Reading symbols from px4fmuv5_bl.elf...done.
|
||||
```
|
||||
```sh
|
||||
GNU gdb (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 8.0.50.20171128-git
|
||||
Copyright (C) 2017 Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law.
|
||||
Type "show copying" and "show warranty" for details.
|
||||
This GDB was configured as "--host=x86_64-linux-gnu --target=arm-none-eabi".
|
||||
Type "show configuration" for configuration details.
|
||||
For bug reporting instructions, please see:
|
||||
<https://www.sourceware.org/gdb/bugs/>.
|
||||
Find the GDB manual and other documentation resources online at:
|
||||
<https://www.sourceware.org/gdb/documentation/>.
|
||||
For help, type "help".
|
||||
Type "apropos word" to search for commands related to "word"...
|
||||
Reading symbols from px4fmuv5_bl.elf...done.
|
||||
```
|
||||
|
||||
5. Find your `<dronecode-probe-id>` by running an `ls` command in the **/dev/serial/by-id** directory.
|
||||
|
||||
6. Now connect to the debug probe with the following command:
|
||||
|
||||
```sh
|
||||
tar ext /dev/serial/by-id/<dronecode-probe-id>
|
||||
```
|
||||
```sh
|
||||
tar ext /dev/serial/by-id/<dronecode-probe-id>
|
||||
```
|
||||
|
||||
7. Power on the Pixhawk with another USB cable and connect the probe to the `FMU-DEBUG` port.
|
||||
|
||||
::: info
|
||||
If using a Zubax BugFace BF1 you may need to remove the case in order to connect to the `FMU-DEBUG` port (e.g. on Pixhawk 4 you would do this using a T6 Torx screwdriver).
|
||||
::: info
|
||||
If using a Zubax BugFace BF1 you may need to remove the case in order to connect to the `FMU-DEBUG` port (e.g. on Pixhawk 4 you would do this using a T6 Torx screwdriver).
|
||||
|
||||
:::
|
||||
|
||||
8. Use the following command to scan for the Pixhawk\`s SWD and connect to it:
|
||||
|
||||
```sh
|
||||
(gdb) mon swdp_scan
|
||||
(gdb) attach 1
|
||||
```
|
||||
```sh
|
||||
(gdb) mon swdp_scan
|
||||
(gdb) attach 1
|
||||
```
|
||||
|
||||
9. 이제 바이너리를 픽스호크에 로드하십시오:
|
||||
|
||||
```sh
|
||||
(gdb) load
|
||||
```
|
||||
```sh
|
||||
(gdb) load
|
||||
```
|
||||
|
||||
After the bootloader has updated you can [Load PX4 Firmware](../config/firmware.md) using _QGroundControl_.
|
||||
|
||||
@@ -182,25 +182,25 @@ To update the bootloader:
|
||||
1. SD카드를 삽입합니다 (발생 가능한 문제들의 디버깅을 위한 부트 로그 기록을 가능하게 합니다.)
|
||||
|
||||
2. [Update the Firmware](../config/firmware.md) to PX4 _master_ version (when updating the firmware, check **Advanced settings** and then select **Developer Build (master)** from the dropdown list).
|
||||
_QGroundControl_ will automatically detect that the hardware supports FMUv2 and install the appropriate Firmware.
|
||||
_QGroundControl_ will automatically detect that the hardware supports FMUv2 and install the appropriate Firmware.
|
||||
|
||||

|
||||

|
||||
|
||||
기체가 재부팅될 때까지 기다리십시오.
|
||||
기체가 재부팅될 때까지 기다리십시오.
|
||||
|
||||
3. [Find and enable](../advanced_config/parameters.md) the parameter [SYS_BL_UPDATE](../advanced_config/parameter_reference.md#SYS_BL_UPDATE).
|
||||
|
||||
4. 재부팅하십시오 (보드의 연결을 끊고 다시 연결하십시오.).
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
부트로더 업데이트는 수초내에 완료됩니다.
|
||||
|
||||
5. Then [Update the Firmware](../config/firmware.md) again.
|
||||
This time _QGroundControl_ should autodetect the hardware as FMUv3 and update the Firmware appropriately.
|
||||
This time _QGroundControl_ should autodetect the hardware as FMUv3 and update the Firmware appropriately.
|
||||
|
||||

|
||||

|
||||
|
||||
::: info
|
||||
If the hardware has the [Silicon Errata](../flight_controller/silicon_errata.md#fmuv2-pixhawk-silicon-errata) it will still be detected as FMUv2 and you will see that FMUv2 was re-installed (in console).
|
||||
In this case you will not be able to install FMUv3 hardware.
|
||||
::: info
|
||||
If the hardware has the [Silicon Errata](../flight_controller/silicon_errata.md#fmuv2-pixhawk-silicon-errata) it will still be detected as FMUv2 and you will see that FMUv2 was re-installed (in console).
|
||||
In this case you will not be able to install FMUv3 hardware.
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ The process is demonstrated for a multicopter, but is equally valid for other ve
|
||||
- 기체에 시동을 걸고 스로틀을 천천히 최대로 올립니다.
|
||||
- 스로틀을 천천히 0까지 낮춥니다.
|
||||
- 기체 시동을 끄십시오.
|
||||
> <strong x-id="1">참고</strong> 진동을 면밀히 관찰하고, 신중하게 테스트를 진행하십시오.
|
||||
> <strong x-id="1">참고</strong> 진동을 면밀히 관찰하고, 신중하게 테스트를 진행하십시오.
|
||||
|
||||
::: info
|
||||
Perform the test carefully and closely monitor the vibrations.
|
||||
|
||||
@@ -94,29 +94,29 @@ ESC를 보정하려면 :
|
||||
|
||||
- The minimum value for a motor (default: `1100us`) should make the motor spin slowly but reliably, and also spin up reliably after it was stopped.
|
||||
|
||||
You can confirm that a motor spins at minimum (still without propellers) in [Actuator Testing](../config/actuators.md#actuator-testing), by enabling the sliders, and then moving the test output slider for the motor to the first snap position from the bottom.
|
||||
The correct value should make the motor spin immediately and reliably as you move the slider from disarmed to minimum.
|
||||
You can confirm that a motor spins at minimum (still without propellers) in [Actuator Testing](../config/actuators.md#actuator-testing), by enabling the sliders, and then moving the test output slider for the motor to the first snap position from the bottom.
|
||||
The correct value should make the motor spin immediately and reliably as you move the slider from disarmed to minimum.
|
||||
|
||||
To find the "optimal" minimum value, move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting in small increments (e.g. 1025us, 1050us, etc), until the motor starts to spin reliably (it is better to be a little too high than a little too low).
|
||||
Enter this value into the `minimum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
To find the "optimal" minimum value, move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting in small increments (e.g. 1025us, 1050us, etc), until the motor starts to spin reliably (it is better to be a little too high than a little too low).
|
||||
Enter this value into the `minimum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
|
||||
- The maximum value for a motor (default: `1900us`) should be chosen such that increasing the value doesn't make the motor spin any faster.
|
||||
|
||||
You can confirm that the motor spins quickly at the maximum setting in [Actuator Testing](../config/actuators.md#actuator-testing), by moving the associated test output slider to the top position.
|
||||
You can confirm that the motor spins quickly at the maximum setting in [Actuator Testing](../config/actuators.md#actuator-testing), by moving the associated test output slider to the top position.
|
||||
|
||||
To find the "optimal" maximum value, first move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting to near the default maximum (`1900`) - the motors should spin up.
|
||||
Listen to the tone of the motor as you increase the PWM maximum value for the output in increments (e.g. 1925us, 1950us, etc).
|
||||
The optimal value is found at the point when the sound of the motors does not change as you increase the value of the output.
|
||||
Enter this value into the `maximum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
To find the "optimal" maximum value, first move the slider to the bottom (disarmed).
|
||||
Then increase the PWM output's `disarmed` setting to near the default maximum (`1900`) - the motors should spin up.
|
||||
Listen to the tone of the motor as you increase the PWM maximum value for the output in increments (e.g. 1925us, 1950us, etc).
|
||||
The optimal value is found at the point when the sound of the motors does not change as you increase the value of the output.
|
||||
Enter this value into the `maximum` setting for all the motor PWM outputs, and restore the `disarmed` output to `1100us`.
|
||||
|
||||
- The disarmed value for a motor (default: `1000us`) should make the motor stop and stay stopped.
|
||||
|
||||
You can confirm this in [Actuator Testing](../config/actuators.md#actuator-testing) by moving the test output slider to the snap position at the bottom of the slider and observing that the motor does not spin.
|
||||
You can confirm this in [Actuator Testing](../config/actuators.md#actuator-testing) by moving the test output slider to the snap position at the bottom of the slider and observing that the motor does not spin.
|
||||
|
||||
If the ESC spins with the default value of 1000us then the ESC is not properly calibrated.
|
||||
If using an ESC that can't be calibrated, you should reduce the PWM output value for the output to below where the motor does not spin anymore (such as 950us or 900us).
|
||||
If the ESC spins with the default value of 1000us then the ESC is not properly calibrated.
|
||||
If using an ESC that can't be calibrated, you should reduce the PWM output value for the output to below where the motor does not spin anymore (such as 950us or 900us).
|
||||
|
||||
::: info
|
||||
VTOL and fixed-wing motors do not need any special PWM configuration.
|
||||
|
||||
@@ -87,14 +87,14 @@ To set the above "example" configuration using the _QGroundControl_:
|
||||
|
||||
3. Enter commands "like" the ones below into the _MAVLink Console_ (to write the values to the configuration file):
|
||||
|
||||
```sh
|
||||
echo DEVICE=eth0 > /fs/microsd/net.cfg
|
||||
echo BOOTPROTO=fallback >> /fs/microsd/net.cfg
|
||||
echo IPADDR=10.41.10.2 >> /fs/microsd/net.cfg
|
||||
echo NETMASK=255.255.255.0 >>/fs/microsd/net.cfg
|
||||
echo ROUTER=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
echo DNS=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
```
|
||||
```sh
|
||||
echo DEVICE=eth0 > /fs/microsd/net.cfg
|
||||
echo BOOTPROTO=fallback >> /fs/microsd/net.cfg
|
||||
echo IPADDR=10.41.10.2 >> /fs/microsd/net.cfg
|
||||
echo NETMASK=255.255.255.0 >>/fs/microsd/net.cfg
|
||||
echo ROUTER=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
echo DNS=10.41.10.254 >>/fs/microsd/net.cfg
|
||||
```
|
||||
|
||||
4. Once the network configuration has been set you can disconnect the USB cable.
|
||||
|
||||
@@ -113,36 +113,36 @@ Note that there are many more [examples](https://github.com/canonical/netplan/tr
|
||||
To setup the Ubuntu Computer:
|
||||
|
||||
1. In a terminal, create and open a `netplan` configuration file: `/etc/netplan/01-network-manager-all.yaml`
|
||||
Below we do this using the _nano_ text editor.
|
||||
Below we do this using the _nano_ text editor.
|
||||
|
||||
```
|
||||
sudo nano /etc/netplan/01-network-manager-all.yaml
|
||||
```
|
||||
```
|
||||
sudo nano /etc/netplan/01-network-manager-all.yaml
|
||||
```
|
||||
|
||||
2. Copy and paste the following configuration information into the file (note: the indentations are important!):
|
||||
|
||||
```
|
||||
network:
|
||||
version: 2
|
||||
renderer: NetworkManager
|
||||
ethernets:
|
||||
enp2s0:
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
nameservers:
|
||||
addresses: [10.41.10.1]
|
||||
routes:
|
||||
- to: 10.41.10.1
|
||||
via: 10.41.10.1
|
||||
```
|
||||
```
|
||||
network:
|
||||
version: 2
|
||||
renderer: NetworkManager
|
||||
ethernets:
|
||||
enp2s0:
|
||||
addresses:
|
||||
- 10.41.10.1/24
|
||||
nameservers:
|
||||
addresses: [10.41.10.1]
|
||||
routes:
|
||||
- to: 10.41.10.1
|
||||
via: 10.41.10.1
|
||||
```
|
||||
|
||||
Save and exit the editor.
|
||||
Save and exit the editor.
|
||||
|
||||
3. Apply the _netplan_ configuration by entering the following command into the Ubuntu terminal.
|
||||
|
||||
```
|
||||
sudo netplan apply
|
||||
```
|
||||
```
|
||||
sudo netplan apply
|
||||
```
|
||||
|
||||
### Companion Computer Ethernet Network Setup
|
||||
|
||||
@@ -189,9 +189,9 @@ To connect QGroundControl to PX4 over Ethernet:
|
||||
|
||||
3. Start QGroundControl and [define a comm link](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/settings_view/settings_view.html) (**Application Settings > Comm Links**) specifying the _server address_ and port as the IP address and port assigned in PX4, respectively.
|
||||
|
||||
Assuming that the values are set as described in the rest of this topic the setup will look like this:
|
||||
Assuming that the values are set as described in the rest of this topic the setup will look like this:
|
||||
|
||||

|
||||

|
||||
|
||||
4. QGroundControl should then connect if you select this link.
|
||||
|
||||
@@ -205,14 +205,14 @@ To setup MAVSDK-Python running on a companion computer:
|
||||
|
||||
1. [Set up the Ethernet Network](#setting-up-the-ethernet-network) so your companion computer and PX4 run on the same network.
|
||||
2. Modify the [PX4 Ethernet Port Configuration](#px4-ethernet-network-setup) to connect to a companion computer.
|
||||
You might change the parameters [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) and [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) to `14540`, and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
You might change the parameters [MAV_2_REMOTE_PRT](../advanced_config/parameter_reference.md#MAV_2_REMOTE_PRT) and [MAV_2_UDP_PRT](../advanced_config/parameter_reference.md#MAV_2_UDP_PRT) to `14540`, and [MAV_2_MODE](../advanced_config/parameter_reference.md#MAV_2_MODE) to `2` (Onboard).
|
||||
3. Follow the instructions in [MAVSDK-python](https://github.com/mavlink/MAVSDK-Python) to install and use MAVSDK.
|
||||
|
||||
For example, your code will connect to the PX4 using:
|
||||
For example, your code will connect to the PX4 using:
|
||||
|
||||
```python
|
||||
await drone.connect(system_address="udp://10.41.10.2:14540")
|
||||
```
|
||||
```python
|
||||
await drone.connect(system_address="udp://10.41.10.2:14540")
|
||||
```
|
||||
|
||||
:::info
|
||||
MAVSDK can connect to the PX4 on port `14550` if you don't modify the PX4 Ethernet port configuration.
|
||||
@@ -235,38 +235,38 @@ To set up ROS 2:
|
||||
1. Connect your flight controller and companion computer via Ethernet.
|
||||
|
||||
2. [Start the uXRCE-DDS client on PX4](../middleware/uxrce_dds.md#starting-the-client), either manually or by customizing the system startup script.
|
||||
Note that you must use the IP address of the companion computer and the UDP port on which the agent is listening (the example configuration above sets the companion IP address to `10.41.10.1`, and the agent UDP port is set to `8888` in the next step).
|
||||
Note that you must use the IP address of the companion computer and the UDP port on which the agent is listening (the example configuration above sets the companion IP address to `10.41.10.1`, and the agent UDP port is set to `8888` in the next step).
|
||||
|
||||
3. [Start the micro XRCE-DDS agent on the companion computer](../middleware/uxrce_dds.md#starting-the-agent).
|
||||
For example, enter the following command in a terminal to start the agent listening on UDP port `8888`.
|
||||
For example, enter the following command in a terminal to start the agent listening on UDP port `8888`.
|
||||
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
```sh
|
||||
MicroXRCEAgent udp4 -p 8888
|
||||
```
|
||||
|
||||
4. Run a [listener node](../ros2/user_guide.md#running-the-example) in a new terminal to confirm the connection is established:
|
||||
|
||||
```sh
|
||||
source ~/ws_sensor_combined/install/setup.bash
|
||||
ros2 launch px4_ros_com sensor_combined_listener.launch.py
|
||||
```
|
||||
```sh
|
||||
source ~/ws_sensor_combined/install/setup.bash
|
||||
ros2 launch px4_ros_com sensor_combined_listener.launch.py
|
||||
```
|
||||
|
||||
If everything is setup correctly, the following output should be displayed in the terminal:
|
||||
If everything is setup correctly, the following output should be displayed in the terminal:
|
||||
|
||||
```sh
|
||||
RECEIVED SENSOR COMBINED DATA
|
||||
=============================
|
||||
ts: 855801598
|
||||
gyro_rad[0]: -0.00339938
|
||||
gyro_rad[1]: 0.00440091
|
||||
gyro_rad[2]: 0.00513893
|
||||
gyro_integral_dt: 4997
|
||||
accelerometer_timestamp_relative: 0
|
||||
accelerometer_m_s2[0]: -0.0324082
|
||||
accelerometer_m_s2[1]: 0.0392213
|
||||
accelerometer_m_s2[2]: -9.77914
|
||||
accelerometer_integral_dt: 4997
|
||||
```
|
||||
```sh
|
||||
RECEIVED SENSOR COMBINED DATA
|
||||
=============================
|
||||
ts: 855801598
|
||||
gyro_rad[0]: -0.00339938
|
||||
gyro_rad[1]: 0.00440091
|
||||
gyro_rad[2]: 0.00513893
|
||||
gyro_integral_dt: 4997
|
||||
accelerometer_timestamp_relative: 0
|
||||
accelerometer_m_s2[0]: -0.0324082
|
||||
accelerometer_m_s2[1]: 0.0392213
|
||||
accelerometer_m_s2[2]: -9.77914
|
||||
accelerometer_integral_dt: 4997
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
|
||||
@@ -55,19 +55,17 @@ RC controllers will use different sticks for throttle and yaw [based on their mo
|
||||
- _Arm:_ Left-stick to right, right-stick to bottom.
|
||||
- _Disarm:_ Left-stick to left, right-stick to the bottom.
|
||||
|
||||
The required hold time can be configured using [COM_RC_ARM_HYST](#COM_RC_ARM_HYST).
|
||||
Note that by default ([COM_DISARM_MAN](#COM_DISARM_MAN)) you can also disarm in flight using gestures/buttons: you may choose to disable this to avoid accidental disarming.
|
||||
|
||||
| 매개변수 | 설명 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="MAN_ARM_GESTURE"></a>[MAN_ARM_GESTURE](../advanced_config/parameter_reference.md#MAN_ARM_GESTURE) | Enable arm/disarm stick guesture. `0`: Disabled, `1`: Enabled (default). |
|
||||
| <a id="COM_DISARM_MAN"></a>[COM_DISARM_MAN](../advanced_config/parameter_reference.md#COM_DISARM_MAN) | Enable disarming in flight via switch/stick/button in MC manual thrust modes. `0`: Disabled, `1`: Enabled (default). |
|
||||
| <a id="COM_RC_ARM_HYST"></a>[COM_RC_ARM_HYST](../advanced_config/parameter_reference.md#COM_RC_ARM_HYST) | Time that RC stick must be held in arm/disarm position before arming/disarming occurs (default: `1` second). |
|
||||
| 매개변수 | 설명 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="MAN_ARM_GESTURE"></a>[MAN_ARM_GESTURE](../advanced_config/parameter_reference.md#MAN_ARM_GESTURE) | Enable arm/disarm stick guesture. `0`: Disabled, `1`: Enabled (default). |
|
||||
| <a id="COM_DISARM_MAN"></a>[COM_DISARM_MAN](../advanced_config/parameter_reference.md#COM_DISARM_MAN) | Enable disarming in flight via switch/stick/button in MC manual thrust modes. `0`: Disabled, `1`: Enabled (default). |
|
||||
|
||||
## Arming Button/Switch {#arm_disarm_switch}
|
||||
|
||||
An _arming button_ or "momentary switch" can be configured to trigger arm/disarm _instead_ of [gesture-based arming](#arm_disarm_gestures) (setting an arming switch disables arming gestures).
|
||||
The button should be held down for ([nominally](#COM_RC_ARM_HYST)) one second to arm (when disarmed) or disarm (when armed).
|
||||
The button should be held down for one second to arm (when disarmed) or disarm (when armed).
|
||||
|
||||
A two-position switch can also be used for arming/disarming, where the respective arm/disarm commands are sent on switch _transitions_.
|
||||
|
||||
@@ -77,10 +75,10 @@ Two-position arming switches are primarily used in/recommended for racing drones
|
||||
|
||||
The switch or button is assigned (and enabled) using [RC_MAP_ARM_SW](#RC_MAP_ARM_SW), and the switch "type" is configured using [COM_ARM_SWISBTN](#COM_ARM_SWISBTN).
|
||||
|
||||
| 매개변수 | 설명 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="RC_MAP_ARM_SW"></a>[RC_MAP_ARM_SW](../advanced_config/parameter_reference.md#RC_MAP_ARM_SW) | RC arm 스위치 채널 (기본값 : 0 - 할당되지 않음). 정의된 경우 지정된 RC 채널(버튼/스위치)이 스틱 제스처 대신 시동용으로 사용됩니다. <br>**Note:**<br>- This setting _disables the stick gesture_!<br>- This setting applies to RC controllers. It does not apply to Joystick controllers that are connected via _QGroundControl_. |
|
||||
| <a id="COM_ARM_SWISBTN"></a>[COM_ARM_SWISBTN](../advanced_config/parameter_reference.md#COM_ARM_SWISBTN) | 시동 스위치는 순간적으로 동작하는 버튼입니다. <br>- `0`: Arm switch is a 2-position switch where arm/disarm commands are sent on switch transitions.<br>-`1`: Arm switch is a button or momentary button where the arm/disarm command ae sent after holding down button for set time ([COM_RC_ARM_HYST](#COM_RC_ARM_HYST)). |
|
||||
| 매개변수 | 설명 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <a id="RC_MAP_ARM_SW"></a>[RC_MAP_ARM_SW](../advanced_config/parameter_reference.md#RC_MAP_ARM_SW) | RC arm 스위치 채널 (기본값 : 0 - 할당되지 않음). 정의된 경우 지정된 RC 채널(버튼/스위치)이 스틱 제스처 대신 시동용으로 사용됩니다. <br>**Note:**<br>- This setting _disables the stick gesture_!<br>- This setting applies to RC controllers. It does not apply to Joystick controllers that are connected via _QGroundControl_. |
|
||||
| <a id="COM_ARM_SWISBTN"></a>[COM_ARM_SWISBTN](../advanced_config/parameter_reference.md#COM_ARM_SWISBTN) | 시동 스위치는 순간적으로 동작하는 버튼입니다. <br>- `0`: Arm switch is a 2-position switch where arm/disarm commands are sent on switch transitions.<br>-`1`: Arm switch is a momentary button where the arm/disarm command is sent after holding down the button for one second. |
|
||||
|
||||
:::info
|
||||
The switch can also be set as part of _QGroundControl_ [Flight Mode](../config/flight_mode.md) configuration.
|
||||
@@ -153,14 +151,14 @@ It corresponds to: [COM_PREARM_MODE=1](#COM_PREARM_MODE) (safety switch) and [CB
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Disabled and Safety Switch
|
||||
|
||||
@@ -170,14 +168,14 @@ This corresponds to [COM_PREARM_MODE=0](#COM_PREARM_MODE) (Disabled) and [CBRK_I
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- _All actuators stay locked into disarmed position (same as disarmed)._
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- _All actuators stay locked into disarmed position (same as disarmed)._
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Always and Safety Switch
|
||||
|
||||
@@ -188,13 +186,13 @@ This corresponds to [COM_PREARM_MODE=2](#COM_PREARM_MODE) (Always) and [CBRK_IO_
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시동 걸기 불가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시동 걸기 불가능
|
||||
2. 안전 스위치 누름
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
3. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Safety or Disabled and No Safety Switch
|
||||
|
||||
@@ -204,11 +202,11 @@ This corresponds to [COM_PREARM_MODE=0 or 1](#COM_PREARM_MODE) (Disabled/Safety
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 모든 액츄에이터를 시동 해제 상태로 잠금
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
2. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### COM_PREARM_MODE = Always and No Safety Switch
|
||||
|
||||
@@ -218,11 +216,11 @@ This corresponds to [COM_PREARM_MODE=2](#COM_PREARM_MODE) (Always) and [CBRK_IO_
|
||||
시작 절차는 다음과 같습니다:
|
||||
|
||||
1. 전원 인가
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
- 시스템이 시동전 상태로 전환: 추진 모터를 제외한 모든 액츄에이터 동작 가능(예: 보조익)
|
||||
- 시스템 안전 장치 꺼짐: 시동 가능
|
||||
2. 시동 명령 인가
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
- 시스템에 시동이 걸림
|
||||
- 모든 모터와 액츄에이터를 움직일 수 있음
|
||||
|
||||
### 매개변수
|
||||
|
||||
|
||||
@@ -94,11 +94,11 @@ PX4는 두 가지 보정 절차를 지원합니다.
|
||||
|
||||
9. Open a terminal window in the **Firmware/Tools** directory and run the python calibration script:
|
||||
|
||||
```sh
|
||||
python process_sensor_caldata.py <full path name to .ulog file>
|
||||
```
|
||||
```sh
|
||||
python process_sensor_caldata.py <full path name to .ulog file>
|
||||
```
|
||||
|
||||
This will generate a **.pdf** file showing the measured data and curve fits for each sensor, and a **.params** file containing the calibration parameters.
|
||||
This will generate a **.pdf** file showing the measured data and curve fits for each sensor, and a **.params** file containing the calibration parameters.
|
||||
|
||||
10. Power the board, connect _QGroundControl_ and load the parameter from the generated **.params** file onto the board using _QGroundControl_. 매개변수의 갯수가 많이지므로, 로드 시간이 길어질 수 있습니다.
|
||||
|
||||
|
||||
@@ -158,29 +158,29 @@ Three axis body fixed magnetometer data at a minimum rate of 5Hz is required to
|
||||
Magnetometer data fusion can be configured using [EKF2_MAG_TYPE](../advanced_config/parameter_reference.md#EKF2_MAG_TYPE):
|
||||
|
||||
0. Automatic:
|
||||
- The magnetometer readings only affect the heading estimate before arming, and the whole attitude after arming.
|
||||
- Heading and tilt errors are compensated when using this method.
|
||||
- Incorrect magnetic field measurements can degrade the tilt estimate.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
- The magnetometer readings only affect the heading estimate before arming, and the whole attitude after arming.
|
||||
- Heading and tilt errors are compensated when using this method.
|
||||
- Incorrect magnetic field measurements can degrade the tilt estimate.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
1. Magnetic heading:
|
||||
- Only the heading is corrected.
|
||||
The tilt estimate is never affected by incorrect magnetic field measurements.
|
||||
- Tilt errors that could arise when flying without velocity/position aiding are not corrected when using this method.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
- Only the heading is corrected.
|
||||
The tilt estimate is never affected by incorrect magnetic field measurements.
|
||||
- Tilt errors that could arise when flying without velocity/position aiding are not corrected when using this method.
|
||||
- The magnetometer biases are estimated whenever observable.
|
||||
2. Deprecated
|
||||
3. Deprecated
|
||||
4. Deprecated
|
||||
5. None:
|
||||
- Magnetometer data is never used.
|
||||
This is useful when the data can never be trusted (e.g.: high current close to the sensor, external anomalies).
|
||||
- The estimator will use other sources of heading: [GPS heading](#yaw-measurements) or external vision.
|
||||
- When using GPS measurements without another source of heading, the heading can only be initialized after sufficient horizontal acceleration.
|
||||
See [Estimate yaw from vehicle movement](#yaw-from-gps-velocity) below.
|
||||
- Magnetometer data is never used.
|
||||
This is useful when the data can never be trusted (e.g.: high current close to the sensor, external anomalies).
|
||||
- The estimator will use other sources of heading: [GPS heading](#yaw-measurements) or external vision.
|
||||
- When using GPS measurements without another source of heading, the heading can only be initialized after sufficient horizontal acceleration.
|
||||
See [Estimate yaw from vehicle movement](#yaw-from-gps-velocity) below.
|
||||
6. Init only:
|
||||
- Magnetometer data is only used to initialize the heading estimate.
|
||||
This is useful when the data can be used before arming but not afterwards (e.g.: high current after the vehicle is armed).
|
||||
- After initialization, the heading is constrained using other observations.
|
||||
- Unlike mag type `None`, when combined with GPS measurements, this method allows position controlled modes to run directly during takeoff.
|
||||
- Magnetometer data is only used to initialize the heading estimate.
|
||||
This is useful when the data can be used before arming but not afterwards (e.g.: high current after the vehicle is armed).
|
||||
- After initialization, the heading is constrained using other observations.
|
||||
- Unlike mag type `None`, when combined with GPS measurements, this method allows position controlled modes to run directly during takeoff.
|
||||
|
||||
The following selection tree can be used to select the right option:
|
||||
|
||||
@@ -242,8 +242,8 @@ A good tuning is obtained as follows:
|
||||
|
||||
2. Extract the `.ulg` log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html)
|
||||
|
||||
::: info
|
||||
The same log file can be used to tune the [multirotor wind estimator](#mc_wind_estimation_using_drag).
|
||||
::: info
|
||||
The same log file can be used to tune the [multirotor wind estimator](#mc_wind_estimation_using_drag).
|
||||
|
||||
:::
|
||||
|
||||
@@ -351,6 +351,60 @@ The `hpos_drift_rate`, `vpos_drift_rate` and `hspd` are calculated over a period
|
||||
Note that `ekf2_gps_drift` is not logged!
|
||||
:::
|
||||
|
||||
#### GNSS Fault Detection
|
||||
|
||||
PX4's GNSS fault detection protects against malicious or erroneous GNSS signals using selective fusion control based on measurement validation.
|
||||
|
||||
The fault detection logic depends on the GPS mode, and also operates differently for horizontal position and altitude measurements.
|
||||
The mode is set using the [EKF2_GPS_MODE](../advanced_config/parameter_reference.md#EKF2_GPS_MODE) parameter:
|
||||
|
||||
- **Automatic (`0`)** (Default): Assumes that GNSS is generally reliable and is likely to be recovered.
|
||||
EKF2 resets on fusion timeouts if no other source of position is available.
|
||||
- **Dead-reckoning (`1`)**: Assumes that GNSS might be lost indefinitely, so resets should be avoided while we have other estimates of position data.
|
||||
EKF2 may reset if no other sources of position or velocity are available.
|
||||
If GNSS altitude OR horizontal position data drifts, the system disables fusion of both measurements simultaneously (even if one would still pass validation) and avoids performing resets.
|
||||
|
||||
##### Detection Logic
|
||||
|
||||
Horizontal Position:
|
||||
|
||||
- **Automatic mode**: Horizontal position resets to GNSS data if no other horizontal position source is currently being fused (e.g., Auxiliary Global Position - AGP).
|
||||
- **Dead-reckoning mode**: Horizontal position resets to GNSS data only if no other horizontal position OR velocity source is currently being fused (e.g., AGP, airspeed, optical flow).
|
||||
|
||||
Altitude:
|
||||
|
||||
- The altitude logic is more complex due to the height reference sensor ([EKF2_HGT_REF](../advanced_config/parameter_reference.md#EKF2_HGT_REF)) parameter, which is typically set to GNSS or baro in GNSS-denied scenarios.
|
||||
- If height reference is set to baro, GNSS-based height resets are prevented (except when baro fusion fails completely and height reference automatically switches to GNSS).
|
||||
- When height reference is set to GNSS:
|
||||
- **Automatic mode**: Resets occur on drifting GNSS altitude measurements.
|
||||
- **Dead-reckoning mode**: When validation starts failing, the system prevents GNSS altitude resets and labels the GNSS data as faulty.
|
||||
|
||||
##### Faulty GNSS Data During Boot
|
||||
|
||||
The system cannot automatically detect faulty GNSS data during vehicle boot as no baseline comparison exists.
|
||||
|
||||
If GNSS fusion is enabled ([EKF2_GPS_CTRL](../advanced_config/parameter_reference.md#EKF2_GPS_CTRL)), operators will observe incorrect positions on maps and should disable GNSS fusion, then manually set the correct position via ground control station.
|
||||
The global position gets corrected, and if [SENS_BAR_AUTOCAL](../advanced_config/parameter_reference.md#SENS_BAR_AUTOCAL) was enabled, baro offsets are automatically adjusted (through bias correction, not parameter changes).
|
||||
|
||||
##### Enabling GNSS Fusion Mid-Flight
|
||||
|
||||
With Faulty GNSS Data:
|
||||
|
||||
- **Automatic mode**: Vehicle will reset to faulty position - potentially dangerous.
|
||||
- **Dead-reckoning mode**: Large measurement differences cause GNSS rejection and fault detection activation.
|
||||
|
||||
With Valid GNSS Data:
|
||||
|
||||
- **Automatic mode**: Vehicle will reset to GNSS measurements.
|
||||
- **Dead-reckoning mode**: If estimated position/altitude is close enough to measurements, fusion resumes; if too far apart, data gets labeled as faulty.
|
||||
|
||||
##### 참고
|
||||
|
||||
- **Dual Detection**: Horizontal and altitude checks run completely separately but both lead to the same result when triggered - all GNSS fusion gets disabled.
|
||||
- **Recovery**: Only the specific check that labeled data as invalid can re-enable fusion.
|
||||
- **Alternative Sources**: Dead-reckoning mode provides enhanced protection by requiring absence of alternative navigation sources before allowing resets.
|
||||
- **Boot Vulnerability**: Initial faulty GNSS data cannot be detected automatically; requires operator intervention and manual position correction.
|
||||
|
||||
### 거리 측정기
|
||||
|
||||
[Range finder](../sensor/rangefinders.md) distance to ground is used by a single state filter to estimate the vertical position of the terrain relative to the height datum.
|
||||
@@ -458,8 +512,8 @@ A good tuning is obtained as follows:
|
||||
|
||||
1. Fly once in [Position mode](../flight_modes_mc/position.md) repeatedly forwards/backwards/left/right/up/down between rest and maximum speed (best results are obtained when this testing is conducted in still conditions).
|
||||
2. Extract the **.ulg** log file using, for example, [QGroundControl: Analyze > Log Download](https://docs.qgroundcontrol.com/master/en/qgc-user-guide/analyze_view/log_download.html)
|
||||
::: info
|
||||
The same **.ulg** log file can also be used to tune the [static pressure position error coefficients](#correction-for-static-pressure-position-error).
|
||||
::: info
|
||||
The same **.ulg** log file can also be used to tune the [static pressure position error coefficients](#correction-for-static-pressure-position-error).
|
||||
|
||||
:::
|
||||
3. Use the log with the [mc_wind_estimator_tuning.py](https://github.com/PX4/PX4-Autopilot/tree/main/src/modules/ekf2/EKF/python/tuning_tools/mc_wind_estimator) Python script to obtain the optimal set of parameters.
|
||||
|
||||