Explain the networking expansion lane and the three boards it serves,
add the MCUboot flash layout with both slots so slot0 is defined where
it is first used, say that J2 CONSOLE does not follow DS-009 and that
output 8 only works as PWM with S1 open, note the NSH console option
in Debug Port, and move Power and Voltage Ratings to the template
position after Pinouts.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Bring the page closer to the board page template and fix issues found in
review: group the connection sections under Assembly, move the images to a
folder named after the page, link the sensor parts, state that DSM bind is
unsupported (no SPEKTRUM_POWER), note the onboard BMM350 and external
compass detection, use the standard servo-rail wording, and say OneShot is
unsupported on every output (TPM4-6 run at 1 MHz, below BOARD_ONESHOT_FREQ).
Also fix grammar and tool-name styling, and list the board under New Flight
Controllers in the release note.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Document the board the way the other manufacturer supported autopilots
are: what runs where on the i.MX 95, the sensors and ports, the RPMsg
links to Linux, the two build images and key signing for MCUboot, and
flashing over SWD with pyOCD. Hardware details and the Linux image link
to the NXP-Robotics repositories instead of being repeated.
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
PX4 runs on the Cortex-M7 of the i.MX95. The default label runs from
FlexSPI NOR flash behind MCUboot and the build produces the slot0 image
next to the plain binary; the ddr label runs from SDRAM and is loaded
by Linux. Parameters, dataman and logs live on an RPMsg filesystem
served by Linux, the PX4 shell and MAVLink reach Linux over RPMsg ttys.
The README documents the Linux side, signing and flashing with pyOCD.
The board has no PX4 bootloader and no .px4 package. Pins follow the
MR-NavQ95 schematic: the safety switch input is GPIO2_IO07 on the GPS
connector, the safety and RGB LEDs and the CAN transceiver controls sit
on the IO-board I2C expander and are not driven yet, and the
magnetometer and barometer are started on LPI2C1 only, since LPI2C4 is
shared with the Linux core. Two board Kconfig choices cover the
shared pins: GPIO_IO23 on the PWM header is unused by default, PWM
output 8 or the tone alarm (the latter two need a System Manager
configuration that assigns LPTPM6 to the M7), and LPUART2 is the RC
input by default or an NSH debug shell started after boot. The ITCM
function lists are verified against the linked image.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
The output-group parser reads timer_config.cpp as text. A board that
guards timer or channel entries with #if defined(CONFIG_...) now gets
those guards evaluated against the board's Kconfig output, passed as
--board-config by the parameter and actuator metadata generators, so
the PWM_MAIN parameters and the actuator metadata match the channels
the firmware actually has.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
config_additional_init was only written when BOARD_ADDITIONAL_INIT was
set, so clearing the option in an existing build directory left the
cached name in place and the ROMFS kept the old rc.additional_init.
Standalone, goes before the board commit.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Boards can carry board-specific options in boards/<vendor>/<model>/Kconfig;
until now nothing sourced that file.
Standalone, goes before the board commit.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Add the PX4 arch layer for the i.MX9 family: ADC, HRT on LPTMR with
LPIT deadlines, TPM io timers, pin interrupts, LPSPI with chip selects
for all eight instances, critmon on the DWT cycle counter, a tone alarm
on a TPM channel, version reporting with the 128-bit ECID read from the
Fuse Status Block as the UUID, the board reset entry point, plus the
i.MX95 chip include set, the chip mapping in px4_impl_os.cmake and the
PX4_SOC_ARCH_ID_IMX95 id. DShot uses the shared NXP FlexIO driver with
the i.MX9 FlexIO base, offsets, IRQ, clock root and pad hooks.
Not implemented yet: reset of the M7 through the System Manager, LED
PWM and PWM input capture.
i.MX9 timer configs name their timers Timer::TPMn and mark DShot
capable ones with initIOTimerDshot(), so teach
output_groups_from_timer_config.py both forms.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
The FlexIO block and the driver logic are the same on every NXP part
that has FlexIO. Move the driver next to the other shared NXP code and
gather the chip-specific pieces (FlexIO base, register offset prefix,
IRQ number, clock enable, pad configuration, unused-channel test) in one
block at the top, so another chip only has to provide that block.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Boards started by MCUboot, such as the i.MX95 flash build, need the
raw objcopy output wrapped in the MCUboot header and TLV trailer before
it boots. Add CONFIG_BOARD_MCUBOOT_IMGTOOL_ARGS, a board option holding
the imgtool sign arguments, and build <config>.signed.bin next to the
plain .bin from the NuttX CMake, the way Zephyr's west sign does. The
plain .bin and everything derived from it stay as they are.
A signing key is passed through BOARD_MCUBOOT_KEY in the environment
at configure time, so private keys stay out of the board files.
imgtool comes from PyPI via Tools/setup/requirements.txt. When it is
missing, CMake warns and skips the signed image instead of failing the
configure.
The .px4 package is only built when the board has a firmware.prototype,
so a board that boots through MCUboot and has no PX4 bootloader needs
no board_id.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
The -a flag configures the port as a raw 8-bit local line without
touching the baud rate, instead of the serial port setup PX4 applies to
real UARTs. Virtual ttys such as the i.MX95 RPMsg proxy port to Linux
need this.
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
up_pwm_update() takes a channel mask, but the loop passed the channel
index: channel 0 never latched and every other channel latched the
wrong output. Latch all channels once after the setpoints are written.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
RPMsg based ttys and filesystems live in NuttX's openamp directory,
which the PX4 build did not compile. Build it and link it with the
driver and memory manager libraries it depends on, guarded by
CONFIG_OPENAMP so boards without RPMsg keep their build and link line.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
* fix(commander): reject Follow Target and Orbit on fixed-wing
Both modes only exist as multicopter flight tasks. Commander runs them
with the Trajectory setpoint type and neither auto, manual nor offboard
set, so that RC input does not make the flight task exit itself.
On fixed-wing that falls through the outer loop: fw_mode_manager ends in
FW_POSCTRL_MODE_OTHER and publishes no lateral/longitudinal setpoint,
while fw_lateral_longitudinal_control keeps running (the position and
altitude flags are set) on the last setpoint it received, with no
timeout. The vehicle flies a straight line at the previous mode's course
and altitude, or at trim airspeed and wings level on a VTOL that never
flew fixed-wing, with no position feedback and all inner loops healthy.
Mark both modes as not supported for fixed-wing, so entry is refused and
a VTOL transitioning while in one of them falls back to RTL. Follow
Target is reachable via DO_SET_MODE without a vehicle type check; Orbit
is already mapped to Loiter for fixed-wing, but the transition case
applies to it too.
Assisted-by: Claude Opus 5 <noreply@anthropic.com>
* feat(vtol_att_control): Also disallow transition to FW in Follow target
Already done for Orbit, this makes sense also for any other mode that is
not supported for FW.
commander: Remove comment describing old architecture.
Rate setpoints on an axis with no actuator were integrated anyway, so a
pitch-only gimbal reported a yaw angle stuck at the MNT_RANGE_YAW limit.
Signed-off-by: bresch <brescianimathieu@gmail.com>
A released parameter removed without a translation loses its stored value
on upgrade, and nothing in review flags it. EKF2_AGP_*, SENS_IMU_TEMP* and
FD_ACT_* went this way, and their translations and upgrade notes came in
later PRs. Add the rule to the parameter guidelines, which the AI review
loads for src/**.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: A.Burak Tektas <15087318+Abtektas@users.noreply.github.com>
MIS_YAW_TMT defaults to 10s, counted from when the heading is commanded, so a multicopter with low yaw authority continues instead of getting stuck.
Forced heading in a mission still fails the mission.
VTOLs only wait for forced headings.
field tests proved that the increase of SPOOLUP time made in
29436 was not necessary.
Hence it is reverted back to 1.0 s
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@auterion.com>
Fold the four init branches and three update branches into a chain:
- calculate setpoint and limits (min wins over max, stall protection)
- constrain the setpoint to the limits
- init the slew rate state from the current airspeed if NaN, else slew
- apply the limits again to the slewed value, since they can move
faster than the slew rate (bank angle, flaps)
Replace repeated updating of variables by const.
Two intended behaviour changes:
- The clamp runs after the slew step instead of pre-empting it. When
the min airspeed rises slowly underneath the state, the old code
snapped to min and skipped the slew on every iteration, so the
setpoint only crept along with min. It now keeps slewing at full
rate (up to 0.06 m/s difference at 1 m/s^2, 50 Hz).
- The PX4_ISFINITE(airspeed_eas) guards are dropped. The module only
ever stores finite airspeed and tells TECS via enable_airspeed(),
so they were dead code. The slew now keeps updating without valid
airspeed instead of freezing.
Verified with a differential test of old vs new on 4000 random
scenarios: the output never leaves [min, max], and every difference
to the old version is explained by the first point above.
Assisted-By: Claude Fable 5.1 <noreply@anthropic.com>
The load factor compensated min airspeed can exceed FW_AIRSPD_MAX
(heavy configuration, high bank angle).
With an explicit airspeed setpoint (e.g. altitude/position mode) the
slew rate state was then reset to the min and to the max airspeed on
alternating iterations, resulting in a discontinuous airspeed setpoint
jumping between the two.
Raise the effective max airspeed to the min airspeed in that case, so
the bounds are consistent and stall protection takes priority.
adapt_airspeed_setpoint() has an init block that resets the slewed
airspeed setpoint to current airspeed when NaN.
But nothing ever assigned it NaN, so this init block never ran and we
instead always used the update block, with stale values when resuming
airspeed control after a segment in stabilized or similar.
Fix:
- Reset slew state to NaN whenever TECS is not in control
- Initialise the slew rate state when it is NaN
PX4 runs every frame type in the Airframe Reference on any flight
controller with enough outputs, so these sections said nothing specific
to the board. The board page template no longer includes them.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
The 2.3 degree FoV published for the TFMINI/TFMINI-S dates back to
#24700 without a documented source and does not match the Benewake
datasheet, which specifies 2 degrees. Publish the datasheet value so
collision prevention and MAVLink consumers see an honest envelope.
Add the TFMINI Plus as variant 4. It speaks the same protocol but has
a 3.6 degree FoV and 0.1 m minimum range per the datasheet. Selecting
the TFMINI variant for a Plus made PX4 discard all readings below
0.4 m (signal_quality forced to 0), starving EKF2 of range aiding in
close-range use.
Update the PX4 docs so the model table, reported ranges and
out-of-range behaviour distinguish the two models.
Bench-verified on px4_fmu-v6x with a TFMINI Plus: variant 1 reports
h_fov 0.0349 rad and stamps quality 0 below 0.4 m; variant 4 reports
h_fov 0.0628 rad, keeps quality -1 from 0.11 to 0.30 m and stamps
quality 0 at 0.05 m.
Fixes#29460
Assisted-by: GLM:glm-5.3-flash
Signed-off-by: jiakun <53556221+ddwolf87@users.noreply.github.com>
* docs(releases): add two notes lines, move the IMU voter line to 1.18
Follow Me (#29029) and the fixed-wing course to heading fix (#29567)
merged without a release notes entry. The IMU voter line (#28811) was
backported to release/1.18 in #29457, so it belongs in 1.18.md rather
than main.md.
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
* docs(releases): link and tighten the Follow Me and course control notes
Link the EKF2 instance and true airspeed terms, say the Follow Me fix
applies while the mode is active (#29029), and give the airspeed the 7°
heading error was worked out at (#29567).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
---------
Signed-off-by: Saibernard Yogendran <bernie97@seas.upenn.edu>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): restructure Pixhawk 4 page to the board page template
Move the existing content into the flight-controller page template's
sections, headings and anchors, with no change to what the page says,
so that the content additions that follow can be reviewed on their own.
The Quick Summary list becomes Specifications sub-sections, the
connector image moves into Pinouts and the dimensions image into
Mechanical Data, Voltage Ratings moves before Serial Port Mapping,
and Further info becomes Further Information. Port labels are in code
style, and units follow the docs style guide. Links to the changed
anchors are updated.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): add Pixhawk 4 PWM outputs, power and setup sections
Fill in the sections the board page template expects, from the board
source (boards/px4/fmu-v5) and Holybro's datasheet, pinouts and
product page.
- Mark the board discontinued by Holybro but still supported by PX4,
with matching SUMMARY, sidebar and category entries
- Specifications: current IO processor, sensor buses, USB, parameter
storage, SD card, max input voltage and current sensing, and the
datasheet weight
- PWM Outputs: IO and FMU outputs, no DShot, timer groups, and the
capture inputs on CAP & ADC IN
- Power, SD Card, Radio Control, GPS & Compass, Telemetry and CAN
- Serial Port Mapping: USART1, flow control column, printed port
labels, and the same table on the serial port mapping page
- Debug Port: Pixhawk Debug Mini, and the console UART
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): fix Pixhawk 4 specs, links and wording from review
Take the weight and operating temperature from Holybro's latest
datasheet, and link that datasheet in place of the older in-repo copy,
which contradicted the page.
Give the serial and I2C interface lines in the board page template's
form, where the board source and Holybro's pinout agree, and add the
template content the page was missing: the servo rail note, capture
pins as outputs, DSM/S.BUS receiver power pins, the internal compass,
and how to enable a second GPS (GPS_2_CONFIG has no default).
Also fix the wiring quick start's link text for the renamed Pinouts
heading, and make S.BUS spelling and port labels consistent.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
* docs(boards): apply Holybro corrections and discontinued markers to Pixhawk 4
Holybro confirmed the board is discontinued and corrected the weight,
operating temperature, input voltage limits, RC port routing and DShot
support. The discontinued markers follow the earlier discontinued board
pages, and the Pixhawk Standard list now separates discontinued boards.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
---------
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
The report was published with device_id 0, so the sensor could not be
told apart by bus or type (e.g. sensor_optical_flow consumers and test
tooling matching on devtype). PAW3902 already sets it.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Aaron <aaron.s.fuller@gmail.com>
* fix(failure_detector): check altitude loss without a height setpoint
The altitude loss check only ran when an altitude setpoint was present.
While the pilot moves the throttle stick in Altitude/Position mode the
setpoint is NaN, so a failure during a manual climb or manual descent
was never detected.
When there is no height setpoint but a vertical velocity setpoint is
available, keep a reference that remembers the highest altitude reached
and only moves down at the commanded descent rate. Climb or hold
commands therefore protect the best height, and a commanded descent is
compared against the expected one with FD_ALT_LOSS as margin.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(failure_detector): ignore stale descent setpoint in altitude loss check
Without a height setpoint the reference is lowered by the commanded
descent rate. If position control stopped publishing while a descent
was commanded, the last vz was integrated indefinitely, lowering the
reference and masking the altitude loss the detector should catch.
Only integrate the commanded descent while the setpoint is fresh
(within 500 ms of the position estimate); otherwise the reference is
held at the best altitude reached.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* docs(safety): describe altitude loss reference for manual commands
The altitude loss trigger is no longer measured only against an
altitude setpoint. Explain that manual climbs and descents are covered
and how a commanded descent lowers the reference.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(commander): Add a margin to avoid small error accumulation
* fix(failure_detector): keep the altitude loss reference when the setpoint follows the vehicle
In auto modes emergency braking keeps the altitude setpoint on the vehicle
while it falls. The setpoint dragged the reference down with it, and every
time it ended up just below the vehicle the reference was reset, so a free
fall during a mission was not detected.
The reference now only moves down at the commanded descent rate, and it is
kept while the vehicle falls faster than allowed even if it is above the
setpoint.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* style(failure_detector): shorten altitude loss reference comment
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* style(failure_detector): name altitude loss constants as constants
Also document the 2 m/s descent rate margin.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
* fix(failure_detector): apply the descent rate margin once
The commanded descent rate already includes the margin, adding it again
meant a fall up to 2 m/s faster than the reference moves down, with the
setpoint kept on the vehicle, reset the reference instead of being
detected.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
---------
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
Review fixes for the battery failsafe docs. The DroneCAN case was
wrong: batteries sending only BatteryInfo give no remaining flight time,
so distance-aware return never triggers for them. Also fixes the
COM_ARM_BAT_MIN default (-1 uses BAT_CRIT_THR) and a duplicate anchor,
plus wording and capitalisation.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
"Distance-aware return" says what sets it apart from the battery level
failsafe: the return starts earlier the further away the vehicle is.
The COM_LOW_BAT_ACT option labels now name the trigger first, then the
action ("Critical level return, Emergency level land"), and the long
description explains how each level is determined.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>
"Bingo fuel" is military aviation jargon most PX4 users do not know, and
"fuel" is misleading for batteries. Smart Return describes what it does
and follows the "Return" terminology used for the mode since #28543.
Returning on low remaining flight time is now opt-in via the new
COM_LOW_BAT_ACT options 5 and 6, so options 0 to 4 keep their existing
behaviour and only warn, as COM_FLTT_LOW_ACT did by default. This keeps
the value 4 (terminate at emergency level) added on main unchanged.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Andrea Bernasconi <andrea.bernasconi@auterion.com>