I have this board that behaves weirdly with Serial1. Mine is the 2022B variant with ICM42688. I have ELRS rx wired to Serial1, confirmed to be working with betaflight. But somehow ardupilot never detects rc input on Serial1 (I have not tried to use different serial port). Flahsed mine with copter-4.6.3
SERIAL1_OPTIONS,0
SERIAL1_PROTOCOL,23
RC_OPTIONS,11040
RSSI_TYPE,3
My serial2 is used for gps, Serial3 for dji vtx, both confirmed to be working fine. No sbus cable from dji is connected. When I connect gps with external compass via i2c (QMC5883L) it gets baro init error, but I got it fixed with BRD_BOOT_DELAY,500
I also tried BRD_ALT_CONFIG,1 with no success.
I noticed someone had similar problem back in 2024, albeit with sbus instead of crsf
I hope I can still use this board with ardupilot, there’s not much ardupilot compatible FC sold locally here. Really appreciates any help in this hard time.
yes, it is the same wiring; RX1 to tx of elrs, TX1 to rx of elrs. As I mentioned, switching to betaflight works. I have no idea why ardupilot doesnt work, the hwdef seems to be simple enough, pinout seems to be similar with betaflight and inav.
I did tried with combinations of rc_options, but just in case I did it again with different combinations of:
RC_OPTIONS = 32 (default)
rc_options = use 420kbaud
rc_options = suppress crsf mode/rate
brd_alt_config = 1 and also 0 (default)
I even tried rc_protocols = 512 to force it into crsf and still PreArm: RC not found
I also tried to revert back brd_boot_delay back to 0 (default)
each changes with power off and repower on the board (radio is connected to elrs rx). Im using elrs v4.0 but I doubt it’s imcopatible since I sucessfully use it on my other F405 board (different brand)
at this point I’m starting to suspect the firmware itself
seems to also use hwdef from MambaF405US-I2C
in the f405us
# USART1 is wired to SBUS and PPM input
# RC input defaults to timer capture
PB7 TIM4_CH2 TIM4 RCININT PULLDOWN
PB6 USART1_TX USART1 NODMA
# Alt config to allow RCIN on UART
PB7 USART1_RX USART1 NODMA ALT(1)
# SBUS inversion control pin, active low
PC0 USART1_RXINV OUTPUT HIGH GPIO(78) POL(0)
seems to be configuring for serial1 as sbus by default, and allow it as standard serial rx-tx by setting brd_alt_config to 1, but serial1 has no dma (do I get this right?)
and in f405-2022 hwdef
#UART1 Serial RX only
PB7 USART1_RX USART1
PB6 USART1_TX USART1
is now overidden to be usart (no sbus) with dma enabled? I’m confused
Forgive me if I seems to be dumb, I’m very bad with software. But I still want to learn and solve the problem
With the 2022 variant and its associated firmware target, you need BRD_ALT_CONFIG,1 along with all of the well documented ExpressLRS settings already mentioned.
Forgive my previous assesment on hwdef, I somehow did not read this part
undef PA9 PA8 PC9 PC8 PB3 PB11 PC5 PB7 PB6
Anyway, after playing with different parameters, somehow, the board doesnt want to boot anymore, can’t even enter DFU mode (holding boot btn before power up). It could be hardware failure.
Just FYI, I flashed arducopter_with_bl.hex using betaflight online configurator. Maybe next time I should use stm32cubeprogrammer like in the old day.
*UPDATE: the board connects fine. windows just decided to update silently and breaks all my serial ports. I did firmware modification, see post below