Hi,
i wanted to configure FTM0 Channel 0 to interrupt(FTM_ch0_ch1_IRQHandler) on every 1 sec whenever FTM_COUNTER VALUE matches with CnV. FTM0 is configured to Free Running counter.
FTM0_Ovf_Reload_IRQHandler is working well.
(FTM_ch0_ch1_IRQHandler) is not working.
But somehow interrupt is not working. I have attached the program file.
External clock : 12 Mhz
SOSC_DIV1 and SOSC_DIV2 : 6 Mhz
CHIE = 1
TOIE = 1
Please verify and tell me what wrong i am doing here.
Thanks Robin for the Reply
But I wanted to disable the MCU pins for FTM means (ELSB:ELSA = 0:0).
And for Output compare ELSB:ELSA = 0:1/1:0/1:1
Is it possible for disable pins while FTM is in Output Compare mode AND use mcu pins as GPIO??
Have you try this: 47.5.33 External Control of Channels Output
Hi KKumar,
According to the description in "47.4.3.6 Channel (n) Value (C0V - C7V)" of S32K1xx MCU Family - Reference Manual, CnV should be wrote when the channel in output mode. But according to your codes and "Table 47-5. Channel Modes Selection", seems that channel 0 is not configured as output mode. So during debug you may find that the FTM0_C0V is always 0.
Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------