Hi,
My setup runs SBUS very well using converter but can’t run PPM. Same RCIn pin. I just wonder if is it a matter of signal inversion. Should I invert pin connected while sending PPM?
Here is Ardupilot acceptable RC protocol.
Is it IBUS or SBus?
It’s FrSky D8R-II receiver flashed with FW having PPM Sum on pin 8. But it’s not working, PPM is not recognized. The only way to connect is to send 8xPWM to SBUS encoder, this way it works. PPM is not recognized but I can see it on scope. I even used it with Ardu clone 10 years ago so it was working.
Which Flight Controller?
Which Firmwareversion?
Which Parmeter Settings?
Which connection Pin by Pin between Rx and FC
copter - dev master from yesterday
RCIn = Rx2
RC Protocol does not matter. PPM not working if alone or with SBUS or ALL
What about serial inversion? Could be I should enable it or set pullup for PPM? It’s high while idle.
As @Juergen-Fahlbusch may be about to tell you:
RC Input
RC input is configured on the RX2/TX2 (USART2_RX/USART2_TX) pins. It supports ELRS(CSRF), TBS(CSRF), SBUS, IBUS, DSM2, and DSMX.
See Here
Why you don’t wahat you linked?
If the information given is true this FC only supports:
- “RC input is configured on the RX2/TX2 (USART2_RX/USART2_TX) pins. It supports ELRS(CSRF), TBS(CSRF), SBUS, IBUS, DSM2, and DSMX”
So, no PPM at all
@dkemxr was quicker
I have seen this before on a Speedybee FC I believe. No PPM support for some reason.
Little strange. It’s a matter of software not a hardware. Could be PPM build is disabled for this board. But why? It has all what’s needed. I checked online builder and there is a PPM option. I would like to ask original description author why there is no PPM in this sentence.
Looks like @andyp1per may be able to speak to that.
PPM requires soft serial which requires a timer on the input pin. If PPM is not supported its usually because that timer is being used for something else (e.g. bdshot). Also PPM cannot be supported at the same time as serial on the UART, so you have to use an ALT config so that full-duplex protocols like CRSF work out of the box.
Thank you for clarifying.
I understand it was disabled for hardware based issue/reason. Right?
Yes, but you could enable it if you were prepared to give up something else.
PPM is dead, why do you want PPM?
I just have a lot of older staff in my drawer. Especially a set of FrSky goods with telemetry. I’m on the way to rebuild and old copter last flying around 2012-13
Can you give me advice on where to start with code to enable PPM? I would like to look into the code.
On the other hand, SBUS converter is much faster then old receiver so could be PWM>>SBUS conversion is better then build in PPM modulation.
But it just looks ugly.
It’s not possible on RX2/TX2 - no timer. You could do it on RX1 or TX1 if you don’t use the LED. You would change the hwdef to define:
PA10 TIM1_CH3 TIM1 RCININT PULLDOWN
instead of the existing UART1_RX definition
Thank you a lot. Will try this way.
What about
define AP_RCPROTOCOL_PPMSUM_ENABLED
is it enabled by default, always?
Like that:
# USART1
## PA10 USART1_RX USART1
PA10 TIM1_CH3 TIM1 RCININT PULLDOWN
PA9 USART1_TX USART1
# Alt config to allow RCIN on UART
PA10 USART1_RX USART1 ALT(1)
define DEFAULT_SERIAL1_PROTOCOL SerialProtocol_RCIN
# USART2
PD5 USART2_TX USART2
PD6 USART2_RX USART2
#define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_RCIN
define DEFAULT_SERIAL2_PROTOCOL SerialProtocol_None
# LEDs
## PA8 TIM1_CH1 TIM1 PWM(9) GPIO(58) # M9
I’m truly impressed by both your support and code quality. Thanks! It’s working.
@andyp1per The same PPM problem persists with the new board. I have spent time searching a solution but found nothing.
Would you please review the hardware for this card?
Timer1 is used for the main four PWM outputs. I cannot simply replace it, as the LEDs.
ardupilot/libraries/AP_HAL_ChibiOS/hwdef/MicoAir743/hwdef.dat at paku-4.6-add-ons · Paku-/ardupilot
Look at libraries/AP_HAL_ChibiOS/hwdef/scripts/STM32H743xx.py and find a pin with a timer that you can use for PPM that you don’t need for something else. Start with the UART pins.
I tried it yesterday but every timer/pin pair I found stopped with error like " (pair) is not defined" or something like that. Will post error shortly, have to build it again.
I am not certain if you create hedefs manually but the missing BUZZer for MicoAir743 can be enabled as shown below, tested and confirmed to be working.
# PWM output pins
PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50) BIDIR
PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52) BIDIR
PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
#PB1 TIM3_CH4 TIM3 PWM(5) GPIO(54) BIDIR
PB0 TIM3_CH3 TIM3 PWM(6) GPIO(55)
PD12 TIM4_CH1 TIM4 PWM(7) GPIO(56) BIDIR
PD13 TIM4_CH2 TIM4 PWM(8) GPIO(57)
PD14 TIM4_CH3 TIM4 PWM(9) GPIO(58)
PD15 TIM4_CH4 TIM4 PWM(10) GPIO(59)
# Beeper USING TRANSISTOR ONLY !!!
PB1 BUZZER OUTPUT GPIO(54) LOW
define HAL_BUZZER_PIN 54