Skip to content

Commit

Permalink
fmuv5 board_config: added TIM5_CH4 spare pin & 3 Input Cap channels
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielePettenuzzo authored and LorenzMeier committed Apr 3, 2018
1 parent 2e2378c commit 1b68977
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/drivers/boards/px4fmu-v5/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,14 @@
*/
#define GPIO_TIM2_CH1_IN /* PA5 T22C1 FMU_CAP1 */ GPIO_TIM2_CH1IN_3
#define GPIO_TIM2_CH2_IN /* PB3 T22C2 FMU_CAP2 */ GPIO_TIM2_CH2IN_2
#define GPIO_TIM2_CH4_IN /* PB1 T22C4 FMU_CAP3 */ GPIO_TIM2_CH4IN_2
#define GPIO_TIM2_CH4_IN /* PB11 T22C4 FMU_CAP3 */ GPIO_TIM2_CH4IN_2

#define DIRECT_PWM_CAPTURE_CHANNELS 3

/* TIM5_CH4 SPARE PIN */
#define GPIO_TIM5_CH4IN /* PI0 T5C4 TIM5_SPARE_4 */ GPIO_TIM5_CH4IN_2
#define GPIO_TIM5_CH4OUT /* PI0 T5C4 TIM5_SPARE_4 */ GPIO_TIM5_CH4OUT_2

/* PWM
*
* 8 PWM outputs are configured.
Expand Down Expand Up @@ -520,6 +524,19 @@

#define GPS_DEFAULT_UART_PORT "/dev/ttyS0" /* UART1 on FMUv5 */

/* Input Capture Channels. */
#define INPUT_CAP1_TIMER 2
#define INPUT_CAP1_CHANNEL /* T4C1 */ 1
#define GPIO_INPUT_CAP1 /* PA5 */ GPIO_TIM2_CH1_IN

#define INPUT_CAP2_TIMER 2
#define INPUT_CAP2_CHANNEL /* T4C2 */ 2
#define GPIO_INPUT_CAP2 /* PB3 */ GPIO_TIM2_CH2_IN

#define INPUT_CAP3_TIMER 2
#define INPUT_CAP3_CHANNEL /* T4C4 */ 4
#define GPIO_INPUT_CAP3 /* PB11 */ GPIO_TIM2_CH4_IN

/* PWM input driver. Use FMU AUX5 pins attached to timer4 channel 2 */
#define PWMIN_TIMER 4
#define PWMIN_TIMER_CHANNEL /* T4C2 */ 2
Expand Down

0 comments on commit 1b68977

Please sign in to comment.