hi
i have a problem that i haven't solved yet.
ㅇ
failed to generate the above waveform.
through searching i found out a few things.
one of them is that control is possible through overinterrupt.
but i don't know how to use it.
ex) how do you set the overinterrupt to 0.5ns?
i need an example for k146.
please help me. thanks.
this is the source code i referenced.
https://community.nxp.com/t5/S32K/S32K144-FTM-Output-Compare-for-Single-Pulse/m-p/844006
Hi
I did not go through the s32k144_OneShot.zip and their reply completely. Please correct me if I understand it wrong.
I saw that the FTM is configured in Output Compare mode, and it is recommended to modify CnV and MOD to meet your needs (0.5us or 1.2us high pulse , 2.5us period )
Also I don't understand why you want to set overinterrupt to 0.5ns? Shouldn't you set overinterrupt to 0.5us and 1.2us?
Sorry, this example is based on S32K144. It is recommended that you create a new S32K146 project and then add the relevant codes.
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.
-------------------------------------------------------------------------------
That example, configure FTM_SC_CLKS(2)=10b - Fixed frequency clock = SIM_LPOCLKS[RTCCLKSEL]=00b - SOSCDIV1_CLK = 8MHz
And FTM_SC_PS(7) means the FTM counter clock = 8MHz/128. This frequency is too low to generate 0.5us and 1.2us. It is recommended to modify the frequency division(FTM_SC_PS(1) ) or select a higher FTM Clock such as 48MHz FIRC.
If you configure FTM_SC_PS(1), then each FTM counter takes 1/8MHz=0.125us
If you want to get 1.2us, then oneshot0 = 1.2/0.125=9.6≈10;
Sorry I am not familiar with s32k144_OneShot.zip. If you don't understand how to use it, I suggest you refer to other MCU examples to use DMA or FlexIO.