Andy Piper
c4cfc5dbe4
AP_IOMCU: fix eventing mask and some minor cleanups
2023-08-15 06:53:48 +10:00
Andy Piper
2af3d53eac
AP_IOMCU: use a command queue for dshot commands and telemetry requests to avoid losing data
2023-08-15 06:53:48 +10:00
Andy Piper
7b96f66413
AP_IOMCU: add support for getting output mode and mcuid
...
give an appropriate MCUID on F103
2023-08-15 06:53:48 +10:00
Andy Piper
ec1edea1da
AP_IOMCU: add support for shared DMA to iomcu-dshot
...
new event-based update() loop for iomcu to allow for DMA channel sharing
spin event loop at 2Khz to give dshot thread ample access to DMA channels
correct transmission complete callbacks
ensure peripheral is re-enabled on DMA resumption
ensure DMA transactions do not get clobbered by locking
restructure callbacks for shared and non-shared DMA cases
ensure RC updates happen at 1Khz
increase expected delay at startup
2023-08-15 06:53:48 +10:00
Andy Piper
e6e0543b8a
AP_IOMCU: propagate dshot rates through to IOMCU
...
implement dshot ESC telemetry
add support for channel enablement/disablement
add stack checks and reporting for MSP stack
wait correct timeout in tickless mode
ensure that dshot sees all pwm updates as the occur in order to maintain periodicity
ensure dshot options are propagated on reset
implement dshot commands
ensure oneshot/125 and mode are setup correctly
add instrumentation for process stack
prevent illegal recursive locks
ignore requests for dshot 600
add support for soft reboot of iomcu
2023-08-15 06:53:48 +10:00
bugobliterator
ad428ac060
AP_IOMCU: add support for sending DShot function command
...
add support for dshot on iomcu
add support for updating to dshot iofirmware
2023-08-15 06:53:48 +10:00
Andrew Tridgell
22c31ac729
AP_IOMCU: removed set_blocking_writes
2023-07-12 17:06:02 +10:00
Peter Barker
1e81ef93a4
AP_IOMCU: remove intermediate option_is_enabled methods for RC_Channel
2023-06-14 17:39:43 +10:00
Andrew Tridgell
2f1c38e13a
AP_IOMCU: support forcing heater to enabled with a feature bit
2023-03-07 10:33:24 +11:00
Peter Barker
a6831805f1
AP_IOMCU: read many bytes using read(buffer, len) method
2023-02-24 09:37:20 -08:00
Andrew Tridgell
ab0768871b
AP_IOMCU: add internal errors for unresponsive IOMCU
...
if IOMCU stops responding completely or stops giving status update
then give an internal error to help with diagnostics
2023-02-14 09:12:34 +11:00
Andrew Tridgell
65fadfa2fe
AP_IOMCU: fixed an issue with double reset of IOMCU
...
if the IOMCU resets twice in quick succession then the code that
restores the safety state while flying can fail, leading to the
aircraft trying to continue flying with safety on
This results from two issues:
- a race in handling the last_safety_off variable
- the fact that plane sets the soft_armed state based on safety state
2023-02-14 09:12:34 +11:00
Peter Barker
b580c873a8
AP_IOMCU: log number of errors reading status page
2022-09-02 11:16:52 +10:00
Peter Barker
605f42947e
AP_IOMCU: log regardless of success reading status page
2022-09-02 11:16:52 +10:00
Peter Barker
0be9c83692
AP_IOMCU: break logging out as a method
2022-09-02 11:16:52 +10:00
murata
70f0636c90
AP_IOMCU: Console output can be disabled
2022-05-17 09:53:06 +10:00
Randy Mackay
b6e86eee49
AP_IOMCU: valid_GPIO_pin checks if pin configured for GPIO
2022-04-26 15:19:28 +09:00
Randy Mackay
caa2ed3294
AP_IOMCU: convert_pin_number leaves input untouched on failure
2022-04-26 15:19:28 +09:00
Peter Barker
4e122a3d50
AP_IOMCU: rename and make enum RC_Channel::ControlType
...
Type:: is too generic; get_type should probably be get_control_type
2022-02-27 09:55:01 +11:00
Andrew Tridgell
4c5fc1f5ef
AP_IOMCU: removed include of ch.h from headers
2022-02-22 12:13:19 +11:00
Iampete1
ba58cb86db
AP_IOMCU: support digital write
2021-09-28 09:40:25 +10:00
Iampete1
c1a2379504
AP_IOMCU: remove safe PWM
2021-09-14 09:23:02 +10:00
Andrew Tridgell
c0c32a63cc
AP_IOMCU: mark logger Write() calls as streaming where appropriate
2021-08-18 10:20:03 +10:00
Andrew Tridgell
45d82887b3
AP_IOMCU: fixed a safety reset case for IOMCU reset
...
if IOMCU resets in flight when user had disabled the safety switch
using the button then the IOCMU force safety code was not called
2021-05-25 12:14:01 +10:00
Andrew Tridgell
9d87645c6e
AP_IOMCU: fixed event handling bug in IOMCU code
...
if a a message send fails to IOMCU then we were discarding all
currently pending non-recurring events. This means that states like
oneshot enable would be lost if the IOMCU reset.
We now re-trigger all events that have not yet been handled
2021-02-24 18:21:08 +11:00
Andrew Tridgell
9126579b77
AP_IOMCU: added memory to debug code
2021-02-24 18:21:08 +11:00
Andrew Tridgell
87528f47c8
AP_IOMCU: prevent internal error on bootloader flash
...
when we flash the bootloader on boards with an IOMCU we expect a long
delay as the CPU stops during the flash
2021-01-27 09:49:35 +11:00
Jaaaky
4ec1c2ea67
AP_IOMCU: Remove duplicate includes from AP_IOMCU.cpp
2020-12-15 10:01:54 +11:00
Andrew Tridgell
fdff355a8a
AP_IOMCU: fixed handling of RC ignore failsafe option
...
this allows for ignoring SBUS failsafe on boards using an IOMCU
2020-08-25 09:53:26 +10:00
Andrew Tridgell
017f005737
AP_IOMCU: pass supported RC protocols to IOMCU
2020-08-24 16:32:35 +10:00
Peter Barker
f1182637a6
AP_IOMCU: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Andrew Tridgell
fd32dff45a
AP_IOMCU: force safety off on IOMCU reset
...
if safety was forced off previously and we get an IOMCU reset then
force it off when the reset happens so vehicle can keep flying
2020-05-14 18:28:50 +10:00
Peter Barker
f0b38fa11c
AP_IOMCU: create and use INTERNAL_ERROR macro so we get line numbers
2020-04-30 13:21:36 +10:00
Peter Barker
e5b634cdd0
AP_IOMCU: add IOMC log message documentation
2020-04-12 08:36:48 +10:00
Andrew Tridgell
ba779c65ad
AP_IOMCU: added a health check based on status read errors
...
if we have more than 1 in 128 read status requests failing then mark
IOMCU unhealthy
2020-01-18 07:13:11 +11:00
Andrew Tridgell
2d02062bfc
AP_IOMCU: reduce uart buffer sizes
2020-01-18 07:13:11 +11:00
Stephen Dade
52f2ec34fa
AP_IOMCU: Ensure IOMCU does not log if there is no logger
2019-11-20 11:46:34 +11:00
Mark Whitehorn
5276cb7f2b
AP_IOMCU: rename sensor_config_error to config_error
2019-11-08 10:14:34 +11:00
Andrew Tridgell
a11f2b5cfb
AP_IOCMU: added singleton in AP namespace
2019-11-02 16:31:04 +11:00
Andrew Tridgell
34f5b40919
AP_IOMCU: use crc32_small() in AP_IOMCU
...
the slower speed is not noticible and this saves 1k ram
2019-10-28 15:53:16 +11:00
Andrew Tridgell
ef1aaa6db0
AP_IOMCU: fixes for modified AP_ROMFS API
...
need to use AP_ROMFS::free()
2019-10-24 22:03:43 +11:00
Mirko Denecke
12c9e50aef
AP_IOMCU: remove unnecessary tabs and whitespaces
2019-10-21 07:57:44 +11:00
Mark Whitehorn
0a6ae60c89
AP_IOMCU: fix IO fast channel mask
2019-10-01 07:13:33 +10:00
Andrew Tridgell
8ef2046f7b
AP_IOMCU: use blocking writes to uart
...
this avoids the issue of arming failing due to a non-zero protocol count
2019-08-17 17:36:41 +10:00
Andrew Tridgell
454717cf6f
AP_IOMCU: cleanup IO protocol and add logging
...
this cleans up the IOMCU protocol structures now we don't need to be
compatible with the old nuttx based protocol and adds logging of IOMCU
errors
2019-08-17 17:36:41 +10:00
Andrew Tridgell
984542fa53
AP_IOMCU: fixed error handling for short packets
...
this prevents short packets from the IOMCU being processed. A short
enough read could be processed as a valid status packet, which would
lead to invalid values for safety flag and servo voltage
fixes issue #12030
2019-08-17 17:36:41 +10:00
Andrew Tridgell
ef5f83d0b5
AP_IOMCU: remove 2s delay on boot and skip crc check on watchdog
...
thanks to @Jaaaky for the suggestion in #11232
2019-05-03 13:44:56 +10:00
Andrew Tridgell
6c50feaead
AP_IOMCU: improved handling of IOMCU reset
...
use IOMCU timestamp to detect reset
2019-04-28 07:45:33 +10:00
Andrew Tridgell
af54e8620e
AP_IOMCU: prevent startup sync causing an internal error
2019-04-28 07:45:33 +10:00
Andrew Tridgell
c7be7d7343
AP_IOMCU: cope with IOMCU reset
2019-04-22 16:53:35 +10:00