Hi,
I am trying to execute the SDK example frdmk64f_ftm_combine_pwm with Ch 6 and 7 by making the below changes
/*******************************************************************************
* Definitions
******************************************************************************/
/* The Flextimer instance/channel pair used for board */
#define BOARD_FTM_BASEADDR FTM0
/* FTM channel pair 0 works with FTM channels 0 and 1 */
#define BOARD_FTM_CHANNEL_PAIR kFTM_Chnl_6
/* Interrupt number and interrupt handler for the FTM instance used */
#define FTM_INTERRUPT_NUMBER FTM0_IRQn
#define FTM_LED_HANDLER FTM0_IRQHandler
/* Interrupt to enable and flag to read; depends on the FTM channel used */
#define FTM_CHANNEL_INTERRUPT_ENABLE kFTM_Chnl6InterruptEnable
#define FTM_CHANNEL_FLAG kFTM_Chnl6Flag
#define PIN1_IDX 1u /*!< Pin number for pin 1 in a port */
#define PIN2_IDX 2u /*!< Pin number for pin 2 in a port */
#define PIN16_IDX 16u /*!< Pin number for pin 16 in a port */
#define PIN17_IDX 17u /*!< Pin number for pin 17 in a port */
#define PINA1_IDX 1u /*!< Pin number for pin 1 in A port */
#define PINA2_IDX 2u /*!< Pin number for pin 2 in A port */
#define SOPT5_UART0TXSRC_UART_TX 0x00u /*!< UART 0 transmit data source select: UART0_TX pin */
void BOARD_InitPins(void) {
CLOCK_EnableClock(kCLOCK_PortA); /* Port A Clock Gate Control: Clock enabled */
CLOCK_EnableClock(kCLOCK_PortB); /* Port B Clock Gate Control: Clock enabled */
CLOCK_EnableClock(kCLOCK_PortC); /* Port C Clock Gate Control: Clock enabled */
PORT_SetPinMux(PORTB, PIN16_IDX, kPORT_MuxAlt3); /* PORTB16 (pin 62) is configured as UART0_RX */
PORT_SetPinMux(PORTB, PIN17_IDX, kPORT_MuxAlt3); /* PORTB17 (pin 63) is configured as UART0_TX */
//PORT_SetPinMux(PORTC, PIN1_IDX, kPORT_MuxAlt4); /* PORTC1 (pin 71) is configured as FTM0_CH0 */
//PORT_SetPinMux(PORTC, PIN2_IDX, kPORT_MuxAlt4); /* PORTC2 (pin 72) is configured as FTM0_CH1 */
/* PORTA1 (pin 35) is configured as FTM0_CH6 */
PORT_SetPinMux(PORTA, PINA1_IDX, kPORT_MuxAlt3);
/* PORTA2 (pin 36) is configured as FTM0_CH7 */
PORT_SetPinMux(PORTA, PINA2_IDX, kPORT_MuxAlt3);
SIM->SOPT5 = ((SIM->SOPT5 &
(~(SIM_SOPT5_UART0TXSRC_MASK))) /* Mask bits to zero which are setting */
| SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX) /* UART 0 transmit data source select: UART0_TX pin */
);
}
But I cannot see any output, is there any other setting that needs to be changed other than the ones I have shown above?
Regards,
Rashmitha