I am trying to remap the CPPM on the BigQuad deck to a different pin, such that I can also use LPS & SDcard.
IO_1 (PB8) looks like a good option as it has Timer 10 available and does not interfere with anything I plan to use.
I modified cppm.c as follows, but still cannot get it runnig:
Code: Select all
#define CPPM_TIMER TIM10
#define CPPM_TIMER_RCC RCC_APB2Periph_TIM10
#define CPPM_TIMER_CH_Init TIM_OC1Init
#define CPPM_TIMER_CH_PreloadConfig TIM_OC1PreloadConfig
#define CPPM_TIMER_CH_SetCompare TIM_SetCompare1
#define CPPM_GPIO_RCC RCC_AHB1Periph_GPIOB
#define CPPM_GPIO_PORT GPIOB
#define CPPM_GPIO_PIN GPIO_Pin_8
#define CPPM_GPIO_SOURCE GPIO_PinSource8
#define CPPM_GPIO_AF GPIO_AF_TIM10
#define CPPM_TIM_PRESCALER (168 - 1) // TIM10 clock running at sysclk (168 MHz). Prescaler of 168 will give 1MHz --> 1us tick.
All works fine on the original pin.
Any advice on this would be appreaciated!