I connected and configured (Arducopter4.1.3) to a RPM HAL sensor at first for testing to a Matek F405-SE (uses F405-WING) which worked perfect, but when the same sensor is connected to a Pixhawk 4 mini it does nothing.
I used the setup below:
F405-WING
RPM sensor is connected to PWM9
https://ardupilot.org/copter/docs/common-rpm.html
# hw definition file for processing by chibios_pins.py
# Matek F405-Wing, developed by David Ingraham
# Board configuration borrowed from Inav F405SE target
# Read hwdef/fmuv3/hwdef.dat for more info on these options
# SerialX ports are mapped as printed on the top board
# R1/T1 -> Serial1
# R2 -> Sbus (T2 not currently used or available)
# R3/T3 -> Serial3
# R4/T4 -> Serial4
# R5/T5 -> Serial5
# R6/T6 -> Serial6
# Note: UART4/Serial4, UART5/Serial5, USART6/Serial6 have no DMA on RX (TX always DMA).
# If sending highspeed serial data (eg. 921600 baud) to the board, use Serial1/Serial3.
#################################################
### MCU CONFIGURATION ###
#################################################
This file has been truncated. show original
PA8 TIM1_CH1 TIM1 PWM(9) GPIO(58)
BRD_PWM_COUNT,8
RPM2_PIN,58
RPM2_SCALING,1
RPM2_TYPE,1
PH4-Mini
RPM sensor is connected to CAP1
https://ardupilot.org/copter/docs/common-rpm.html
# hw definition file for processing by chibios_hwdef.py
# for Holybro PH4-mini hardware.
# This is a variant of fmuv5 without the IOMCU
include ../fmuv5/hwdef.dat
# we shift the system timer to TIM5 to allow
# us to use TIM2 for extra PWM outputs
STM32_ST_USE_TIMER 5
# order of UARTs (and USB). Telem2 is UART4 on the mini, USART3 is not available
SERIAL_ORDER OTG1 USART2 UART4 USART1 USART6 UART7 OTG2
# enable TX on USART6 (disabled for fmuv5 with iomcu)
PG14 USART6_TX USART6 NODMA
# disable the IOMCU UART
undef IOMCU_UART
undef UART8_TX
undef UART8_RX
This file has been truncated. show original
PA5 TIM2_CH1 TIM2 PWM(9) GPIO(58)
BRD_PWM_COUNT,11
RPM2_PIN,58
RPM2_SCALING,1
RPM2_TYPE,1
Please help!
T-Rex600 PH4 Mini 06-02-2022 RPM.param (20.2 KB)
Matek F405-SE 06-02-2022 RPM.param (18.3 KB)
Solved, it’s working on GPIO 58 now, I don’t know why