Freeing the DMA stream in the hrt callback causes other peripherals on that DMA controller to lock up (namely GPS). Moving the free back into thread context, right before allocation, solves the problem
* hrt: Fix PPM input on channel 2
The CCMR1_PPM define for PPM input on channel 2 was incorrectly set to 2,
which was setting bits for channel 1 instead of channel 2. This prevented
PPM input from functioning properly on channel 2.
Changed CCMR1_PPM for channel 2 from 2 to (1 << 8), which correctly
configures the CC2S bits for input capture mode on TI2.
This fixes an issue noted in the existing code comment:
"FIXME! There is an interaction in the CCMR registers that prevents
using Chan 1 as the timer and chan 2 as the PPM"
Tested on STM32H743 with PPM input on PC7 (TIM8_CH2).
* rc_input: enable sharing serial and PPM pin
By setting RC_SERIAL_PORT_SHARED_PPM_PIN_GPIO_RX it is now possible to
use the same pin on the STM32 for PPM input as well as serial input.
* boards: Add support for Holybro KakuteH7-Wing
* Bidirectional DShot
Co-authored-by: Julian Oes <julian@oes.ch>
* f4/f1 support, not supported
* fix f1 build target
* sanity check timer_channel value, fix CCxNP ifdef, debug stuff
* removed debug code, added define for H7 HAVE_GTIM_CCXNP
* round robin sampling for less than 4 DMA
* unlimited esc_status logging
* dshot: fix formatting
* dshot: add define for number of DMA channels to use
This allows individual boards to override the number of DShot channels
and hence avoid round robin capture of the RPM feedback.
* ARK: enable 4 DMA channels for DShot on 6X
* dshot: publish when all channels are updated
This slows down the ESC_STATUS publication in the case of round robin
capture. E.g. for 800 Hz output with one DMA channel, the ESC_STATUS is
now published at 200 Hz.
* dshot: avoid duplicate publications for bidir and telem
Instead of publishing both bidirectional dshot updates as well as
telemetry updates, we now combine the data from both streams, and
publish whenever we get RPM updates, as the latter arrives with higher
rate, e.g. 200 Hz with round robin, or faster otherwise.
When combining the data, we take RPM from bidirectional dshot, and the
rest from telemetry.
When we have only one of the two, either telemetry or bidirectional
dshot, we just publish that one.
* boards: add ark fpv and pi6x BOARD_DMA_NUM_DSHOT_CHANNELS
* dshot: turn off debug build
---------
Co-authored-by: Julian Oes <julian@oes.ch>
Co-authored-by: alexklimaj <alex@arkelectron.com>
The bootloader can often get stuck parsing random MAVLink traffic,
thinking it had seen a GET_SYNC.
Therefore, this commits adds a two step check which requires a GET_SYNC
followed by a GET_DEVICE to make sure it's really an uploader script
talking to it, and not just random data.
Calling serial::write() in quick succession was blowing away the previous buffer, fsync does not guarantee that data is transmitted on serial lines. On the other hand tcdrain waits until the output buffer is empty.
* Update pab_manifest.c
I have rebased on main and squash my commits into 1.
* Update pab_manifest.c
I have updated pab_manifest.c:
// BASE ID 0x150 ZeroOne Pixhawk Baseboard Alaised to ID 0
{HW_BASE_ID(0x150), base_configuration_0, arraySize(base_configuration_0)}, // ZeroOne Pixhawk Baseboard ver 0x150
This resets the USARTs' clock source selection to the default, in case
it has been changed by the bootloader.
This is required if booting from the ArduPilot bootloader which happens
to reset the clock selection to PLL.
Without this fix, UARTs (including the console) is garbled, so
presumably at an invalid baudrate.
* gnss: update supported baud rates
The Septentrio GNSS driver requires certain baud rates to test all the
supported baud rates of the receiver. Without these changes, certain
"non-standard" ones would print an error to the MAVLink console when the
driver was started through the console.
* platforms: add missing baudrate defines
---------
Co-authored-by: Thomas Frans <franske2000@gmail.com>
Co-authored-by: Julian Oes <julian@oes.ch>