Commit Graph

3158 Commits

Author SHA1 Message Date
Iampete1 73f4a47496 AP_HAL_ChibiOS: and `uart_log` method and stats struct 2024-04-09 10:00:50 +10:00
Iampete1 7dd2529683 AP_HAL_ChibiOS: UARTDriver: add getters for cumulative tx and rx counts 2024-04-09 10:00:50 +10:00
Peter Barker ecf93f6d86 hwdef: remove redundant defines from hwdefs
this is set in the periph defaults file
2024-04-09 09:32:15 +10:00
Andy Piper 75978f9d6f AP_HAL_ChibiOS: CB Unmanned Stamp H743 2024-04-09 09:26:40 +10:00
richaravoil 4cdca46a0c hwdef: adding IMU lines for older version of board 2024-04-08 22:30:57 +10:00
Andy Piper b9fede8a27 AP_HAL_ChibiOS: fixup FoxeerF405v2 build 2024-04-06 10:13:46 +11:00
Michael du Breuil 84cef5b786 AP_HAL_ChibiOS: add sw-boom-f407 and supporting scripts 2024-04-05 10:53:38 +11:00
AlexandrShipovsky ace31e617e AP_HAL_ChibiOS: add CSKY405 board 2024-04-05 10:45:00 +11:00
Andy Piper fdce070f81 AP_HAL_ChibiOS: allow H7RF to build 2024-04-05 10:23:50 +11:00
Iampete1 edc12c2857 AP_HAL_ChibiOS: use new UART stats tracking helper moving history up to util 2024-04-03 13:10:06 +01:00
Andy Piper b045939f1d AP_HAL_ChibiOS: FoxeerF405v2 2024-04-03 18:50:52 +11:00
Peter Barker 47716e2338 hwdef: remove stray HAL_BUILD_AP_PERIPH defines
this is added by defaults_periph
2024-04-03 18:36:29 +11:00
Peter Barker 5fb4e1e285 hwdef: replace defined(HAL_DISABLE_LOOP_DELAY) with HAL_SCHEDULER_LOOP_DELAY_ENABLED 2024-04-03 18:36:29 +11:00
Peter Barker 764f6863ea hwdef: re-enable RCIN thread on some builds/boards
not because they need it, but to make a PR NFC
2024-04-03 18:36:29 +11:00
Peter Barker 994c268644 AP_HAL_ChibiOS: replace HAL_NO_RCIN_THREAD w/HAL_RCIN_THREAD_ENABLED 2024-04-03 18:36:29 +11:00
Henry Wurzburg 594c2466d8 HWDEF:revert copter only build on bds with integrated escs 2024-04-03 18:31:54 +11:00
Peter Barker a65e06e0a9 AP_HAL_ChibiOS: move GPIO ON/off defaults from AP_HAL_ChibiOS to AP_HAL
these can be reused across different vehicles
2024-04-03 11:00:24 +11:00
Peter Barker e1f3864349 hwdef: convert_betaflight_unified.py: don't set HAL_GPIO_LED_OFF
this value is the default value anyway, so don't make many copies..
2024-04-03 11:00:24 +11:00
Peter Barker 10627d296d hwdef: remove HAL_GPIO lines which are simply the default values
... or the _OFF entry, which is simply !HAL_GPIO_MED_ON
2024-04-03 11:00:24 +11:00
Peter Barker 99dd85d51c AP_HAL_ChibiOS: enforce HAL_GPIO_LED_OFF is not(HAL_GPIO_LED_ON)
the current "flexibility" allows for ON/OFF to be the same value.

Many hwdef files where only setting one of these, leaving the other at teh default, too....
2024-04-03 11:00:24 +11:00
mateksys b904ab27f8 AP_HAL_ChibiOS: add MatekH7A3 defaults.parm 2024-04-02 15:29:55 +11:00
mateksys 4c3800c462 AP_HAL_ChibiOS: modify MatekH7A3 hwdef 2024-04-02 15:29:55 +11:00
Peter Barker 33e5b20709 hwdef: re-add ESC control to AP_Periph units which lost it
I'm quite sure that several of these don't actually want it, but want NFC
2024-04-02 11:28:27 +11:00
Peter Barker 416f7d393a hwdef: remove DISABLE_SERIAL_ESC_COMM AP_Periph boilerplate
... use the defaults file instead
2024-04-02 11:28:27 +11:00
Peter Barker f28cfc9a3b hwdef: remove handling of FULL_CHIBIOS_BOOTLOADER directive
the string FULL_CHIBIOS_BOOTLOADER doesn't exist anywhere else in the source code
2024-04-02 11:20:48 +11:00
Henry Wurzburg b83a895d7b HWDEF: allow all build targets for non-integrated boarda 2024-04-02 10:17:21 +11:00
Peter Barker 8fc76e7455 hwdef: remove extraneous lines from hwdef files
these either come from includes are duplicated in these files
2024-03-26 11:09:03 +11:00
Peter Barker 395f438b42 chibios_hwdef.py: print error message if a define is re-defined at top level with same value 2024-03-26 11:09:03 +11:00
Peter Barker eca2fd92b2 chibios_hwdef.py: correct extraction of intdefines
another regex problem
2024-03-26 11:09:03 +11:00
Peter Barker 1f3b4c47a0 hwdef: make a skyviper.inc, use it on skyviper-journey 2024-03-26 11:07:42 +11:00
Peter Barker df19fed523 AP_HAL_ChibiOS: remove VRBrain board sub-types
these were only used to turn choose between AP_Notify LED backends, which can be done much more neatly with specific features defines.
2024-03-26 11:06:13 +11:00
Peter Barker d663f14e3e AP_HAL_ChibiOS: remove HAL_BOARD_SUBTYPE_CHIBIOS_FMUV4
this isn't used for anything
2024-03-26 10:59:23 +11:00
Peter Barker 813f0cf428 hwdef: remove save_some_flash.inc
all but one board was getting all of these includes from minimize_fpv_osd, and the remaining board had most lines foming from minimize_features.inc.

This file has served its purpose, its role now taken on by minimize_fpv_osd.inc
2024-03-24 20:15:53 +11:00
Peter Barker 85d25b205f hwdef: remove unused STM32_PWM_USE_ADVANCED defines 2024-03-23 22:04:34 +11:00
Peter Barker 5d369b2634 chibios_hwdef.py: correct extraction of intdefines from hwdef files
many of our hwdef files contain lines which look like this:

define STM32_PWM_USE_ADVANCED TRUE

The current regex does not allow for numbers in those define, so the regex ends up matching "STM" as a name....

the "intdefines" hash which is populated from these is only used internally to chibios_hwdey.py for logic purposes, not directly in hwdef output purposes, and none of the strings which it looks at contain numbers at the moment, so this is a non-functional change.
2024-03-23 15:23:08 +11:00
Andrew Tridgell 663a41a1f0 hwdef: probe external i2c compasses on MatekL431-GPS 2024-03-23 08:29:24 +11:00
Tim Tuxworth f4d19275fc Chibios: CubeRed - change NET_ENABLED to NET_ENABLE 2024-03-20 19:08:31 +11:00
Andy Piper d2b50edf12 AP_HAL_ChibiOS: Orqa F405 Pro 2024-03-20 19:04:21 +11:00
Andrew Tridgell d3a37d1357 HAL_ChibioOS: fixed FDCAN -> CAN labels
we use CAN1_RX not FDCAN1_RX in our MCU files
2024-03-20 14:26:23 +11:00
Alex P 4b082eb579 hwdef: added JHEMCUGF16F405 2024-03-19 19:53:03 +11:00
Wu 3fbf3368fc AP_HAL_ChibiOS: added RadiolinkPIX6 support 2024-03-19 19:50:42 +11:00
Peter Barker 1d4e0a784c AP_HAL_ChibiOS: rename GPS_ to GPS1_ 2024-03-19 19:50:12 +11:00
Peter Barker 1ee7ef37ab AP_HAL_ChibiOS: adjust for GPS parameter renames 2024-03-19 19:50:12 +11:00
Peter Barker 7ea2928e52 AP_HAL_ChibiOS: allow IOMCU to be turned off in includes 2024-03-18 09:57:12 +11:00
Andrew Tridgell e983738c38 HAL_ChibiOS: fixed a cache corruption issue on H7
This fixes a bug introduced in this PR:

https://github.com/ArduPilot/ardupilot/pull/25900

the bug is that when we don't go via the bouncebuffer on H7 we were
also skipping the cache invalidate/flush ops. This caused data
corruption for filesystem operations, particularly noticible as lua
scripts failing to load with parse errors or log corruption
2024-03-16 21:57:33 +11:00
Andrew Tridgell d1deb1c53b hwdef: added MatekL431-HiRes build 2024-03-16 20:10:35 +11:00
Michelle Rossouw 533eb73622 hwdef: Make Crazyflie2 board only autobuild for Copter 2024-03-15 21:11:40 +11:00
Minderring b316b3ab46 hwdef: added MicoAir405v2 2024-03-15 13:04:29 +11:00
Andy Piper 1e0d271fef AP_HAL_ChibiOS: always normalize ESC channel when using iomcu 2024-03-14 06:40:04 +11:00
Tom Pittenger 9feccd6671 AP_HAL_Chibios hwdef script: remove h747 adc duplicate pin definitions 2024-03-13 18:52:05 +11:00
Randy Mackay 9b981cc7f3 AP_HAL_ChibiOS: CubeRedSecondary IMU orientation fix
Also remove duplicate RC_IN serial protocol
2024-03-13 18:51:18 +11:00
Patrick José Pereira ce9fa18800 AP_HAL_ChibiOS: Use new default for reboot
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2024-03-12 21:13:41 +11:00
Andy Piper 3f681e4626 AP_HAL_ChibiOS: BlitzF745AIO update to ICM-42688
enable OSD
use minimal FPV config
enable compass probing
pull uart pins high in bootloader for ELRS
2024-03-12 09:26:58 +11:00
Peter Barker 96ee586eaa AP_HAL_ChibiOS: move AC_Avoidance defines into libraries 2024-03-11 18:07:18 +11:00
jfbblue0922 7ba9030129 AP_HAL_ChibiOS/hwdef: add LED_SAFETY for JFB100 board definition 2024-03-06 18:52:35 +11:00
Peter Barker b09dd7b866 AP_HAL_ChibiOS: move defaulting of HAL_WITH_ESC_TELEM for periph 2024-03-05 12:37:40 +11:00
subashchandar 7db7f95a3b AP_HAL_ChibiOS: hwdef: Add new hardware pixflamingo f7 2024-03-04 23:26:50 +00:00
Peter Barker 077dd82bdc AP_HAL_ChibiOS: add and use AP_CUSTOMROTATIONS_ENABLED
also add to build_options.py
2024-03-03 08:22:46 +11:00
Andy Piper b248ba5f1b AP_HAL_ChibiOS: provide start time and timeout to all dshot APIs that require it
correct timeout checking for dshot across timer wrap boundaries
fix trigger_groups timeout checks
use rcout_timer_t instead of uint32_t or uint64_t
2024-02-28 22:25:48 +11:00
Randy Mackay fb5df80932 AP_HAL_ChibiOS: AP_Periph does not use AP_VisualOdom 2024-02-28 18:52:37 +11:00
Andy Piper b359ec89a5 AP_HAL_ChibiOS: use standard FPV config for SpeedyBeeF405WING 2024-02-28 18:48:14 +11:00
jfbblue0922 dac1b2e99c AP_HAL_ChibiOS/hwdef: update JFB110 board definition 2024-02-28 15:55:29 +09:00
Andy Piper 242f679206 AP_HAL_ChibiOS: remove iomcu dshot from Pixhawk1-1M and add to Pixhawk1-bdshot
add support for removing ROMFS from hwdef
2024-02-27 12:06:57 +11:00
Iampete1 d4daa990f8 AP_HAL_ChibiOS: hwdef.py: define `HAL_HAVE_AP_ROMFS_EMBEDDED_LUA` if lua files in ROMFS 2024-02-27 11:09:08 +11:00
Peter Barker 2e2b1c9fac AP_HAL_ChibiOS: allow AP_TERRAIN_ENABLED to be turned off in hwdef
adds the ifndef, and changes things to the path defines are undefined if it is false
2024-02-27 11:04:02 +11:00
Peter Barker df3267c9ba waf: remove SKETCH and SKETCHNAME from build sysmte
... renaming one of them to AP_BUILD_TARGET
2024-02-26 15:42:25 +11:00
Peter Barker 3a38aeda59 AP_HAL_ChibiOS: set scheduler task to -4 when running callback tasks 2024-02-21 18:56:50 +11:00
Peter Barker 4113290153 AP_HAL_ChibiOS: remove HerePro
to be replaced by a HereProAP
2024-02-15 13:42:14 +11:00
Peter Barker 5d421e8ee3 AP_HAL_ChibiOS: allow AP_Periph to use mavlink library 2024-02-15 12:17:07 +11:00
Peter Barker 1862b5dc27 chibios_hwdef.py: allow re-use of bootloader from other boards 2024-02-10 21:41:30 +11:00
Andrew Tridgell e8b4010899 HAL_ChibiOS: fixed CANFD timings (again!)
the timing table was not correct, thanks to APD for pointing this out.

This is recalculated from
https://www.kvaser.com/support/calculators/can-fd-bit-timing-calculator,
with transmitter timing delay compensation added and tested with Salae
captures to ensure we are getting the right bit rates
2024-02-09 18:55:08 +11:00
bugobliterator 9919af69bc AP_HAL_ChibiOS: add config to enable sccripting on CANMod 2024-02-07 18:31:02 +11:00
Henry Wurzburg 2729b11b2f hwdef: add ASP5033 airspeed in minimal builds 2024-02-06 11:27:18 +11:00
Peter Barker 4c272d21ee AP_HAL_ChibiOS: make compass.mag_cal_fixed_yaw return boolean
this method could be used from a transmitter without GCS enabled, for example
2024-02-06 11:11:27 +11:00
Peter Barker 9961e8c49d hwdef: remove bad hwdef lines
these have no effect
2024-02-06 10:58:44 +11:00
Peter Barker 0d26118b12 hwdef: tidy AP_Radio includes 2024-02-05 09:26:14 +11:00
Andrew Tridgell 85439360d7 HAL_ChibiOS: fixed I2C4 on STM32G4 2024-02-05 07:36:14 +11:00
Andrew Tridgell 1e4f597e02 HAL_ChibiOS: fixed support for STM32H7A3
need to tell ChibiOS this is a newer H7
2024-02-03 08:36:18 +11:00
Peter Barker a82b7f20c9 AP_HAL_ChibiOS: use HAL_LOGGING_ENABLED in place of HAL_BOOTLOADER_BUILD
bootloader already disables GCS, so we can rely on HAL_GCS_ENABLED in place of HAL_BOOTLOADER_BUILD
2024-02-02 19:21:58 +11:00
David O'Connor 078697c825 hwdef: add AnyLeaf H7 board 2024-02-01 11:43:57 +11:00
Leonardo Garcia 5749bd5074 AP_HAL_ChibiOS: mRo KitCAN revC board fix
Add RM3100 reversal mask to deal with M10025C board changes.
2024-02-01 11:43:35 +11:00
Andrew Tridgell 33f6a1d87e hwdef: added MatekH7A3 support 2024-02-01 11:43:24 +11:00
Andrew Tridgell 054fb94e9a HAL_ChibiOS: added support for STM32H7A3
interesting MCU as it is the first H7 we support that doesn't have a
128k flash sector size
2024-02-01 11:43:24 +11:00
Andrew Tridgell 3171b5321a HAL_ChibiOS: support flash storage with 8k sectors
this allows for doubling up sectors to give an effective sector size
of 16k, allowing for flash storage with a useful storage size
2024-02-01 11:43:24 +11:00
Andrew Tridgell 07d0418cf9 HAL_ChibiOS: fixed flash support on H7 with 8k page size
the STM32H7A3xx has 8k pages
2024-02-01 11:43:24 +11:00
yjuav 8e71cf83cd hwdef: add YJUAV_A6Ultra board support 2024-02-01 11:29:11 +11:00
Andrew Tridgell 30497244d9 HAL_ChibiOS: whitespace fixes 2024-01-30 12:32:23 +11:00
Andrew Tridgell 0a6057f2b3 HAL_ChibiOS: adjust clocks for H723 and H730
FDCAN clock must be 80MHz, and also align no-crystal clocks with
clocks for boards with crystals
2024-01-30 12:32:23 +11:00
Andrew Tridgell aea2863141 hwdef: Added BotBloxSwitch 2024-01-30 12:32:23 +11:00
Andrew Tridgell 967af533b9 HAL_ChibiOS: fixed flash page count on H723
single bank H7 has 8 pages
2024-01-30 12:32:23 +11:00
Andrew Tridgell 4eaf5ef247 HAL_ChibiOS: support STM32H723 boards 2024-01-30 12:32:23 +11:00
Andrew Tridgell e772012e01 HAL_ChibiOS: raise SDMMC clock limit on H7
this allows for faster log download on ethernet
2024-01-29 06:51:11 +11:00
Andrew Tridgell a2707b48c5 HAL_ChibiOS: enable clock management on G4
this allows for a different clock tree in the main fw from the
bootloader
2024-01-25 11:44:02 +11:00
Andrew Tridgell 2d031a4d20 HAL_ChibiOS: switched G4 FDCAN clock to 80MHz
this requires main CPU clock at 160 MHz instead of 168 MHz
2024-01-25 11:44:02 +11:00
Andrew Tridgell 1c8048df8f HAL_ChibiOS: fixed CANFD timings
our CANFD timings were resulting in a lot of busoff errors. Here is an
example of master at 1Mbit/5MBit:

Getting @SYS/can0_stats.txt as -
------- Clock Config -------
CAN_CLK_FREQ:   80MHz
Std Timings: bitrate=1000000 presc=7
sjw=0 bs1=7 bs2=0 sample_point=90.00000%
FD Timings:  bitrate=5000000 presc=1
sjw=0 bs1=5 bs2=0 sample_point=90.00000%
------- CAN Interface Stats -------
tx_requests:    2689
tx_rejected:    0
tx_overflow:    443
tx_success:     7
tx_timedout:    2232
tx_abort:       0
rx_received:    18470
rx_overflow:    0
rx_errors:      0
num_busoff_err: 34439
num_events:     18477
ECR:            F8
fdf_rx:         18467
fdf_tx_req:     2182
fdf_tx:         0

here is an example with the new timings:

------- Clock Config -------
CAN_CLK_FREQ:   80MHz
Std Timings: bitrate=1000000 presc=8
sjw=1 bs1=8 bs2=1 sample_point=90.00000%
FD Timings:  bitrate=8000000 presc=2
sjw=3 bs1=8 bs2=3 sample_point=80.00000%
------- CAN Interface Stats -------
tx_requests:    3023
tx_rejected:    0
tx_overflow:    0
tx_success:     3023
tx_timedout:    0
tx_abort:       0
rx_received:    27865
rx_overflow:    0
rx_errors:      0
num_busoff_err: 0
num_events:     30888
ECR:            0
fdf_rx:         27862
fdf_tx_req:     3016
fdf_tx:         3016

I am testing between a CubeOrange and a Pixhawk6X. I tested 1, 2, 4, 5
and 8 MBit (which are the only valid FD bitrates in our parameters)

Many thanks to Kai from Salient Motion for finding this issue and
providing the corrected timing table
2024-01-25 11:44:02 +11:00
Hayden Donald a81f2785aa AP_HAL_ChibiOS: Use correct pin config for ADC2 and ADC3 2024-01-24 08:03:24 +11:00
MallikarjunSE 873e2eac7d AP_HAL_ChibiOS: update truenav hwdef 2024-01-24 07:58:09 +11:00
Andrew Tridgell e714f0a7a3 AP_HAL_ChibiOS: fixed name of pitch limit parameters 2024-01-23 15:00:30 +11:00
Andrew Tridgell a6bceccd82 AP_HAL_ChibiOS: convert param files LIM_ROLL_CD -> ROLL_LIMIT_DEG 2024-01-23 15:00:30 +11:00
Andrew Tridgell 862b0ed8d6 AP_HAL_ChibiOS: convert param files for pitch limits 2024-01-23 15:00:30 +11:00