AnsweredAssumed Answered

AN5303 flex timer S32 example

Question asked by John Banks on Mar 2, 2018
Latest reply on Mar 8, 2018 by Daniel Martynek

Trying to get the dual edge capture example working from this application note: and the associated zip file on the same page.


Using S32K144EVB, S32DS 2018.R1, I used projects from file system. After fixing the --version problem with: Error while launching command: --version 

and changing #define SW to 5, the example launches on the board.


I see a 10KHz frequency on PTB2 and PTB3 with 0.89V and 2.5V on DVM suggesting ~18% and 50% duty cycle as expected.


Interconnect: PTB2 and PTD15 externally, PTB3 and PTD0 externally as per the code and the blue and red LEDs illuminate. The voltages change because of the drop across the LEDs as expected, but the frequencies remain at 10KHz as expected.


I installed the PE micro feature to show realtime expressions whilst the program is running, and when the program is paused by the debugger I can see values in the expression tab of the debugger. FTM0_CH0_pulse_width and FTM0_CH2_pulse_width do not update from 0. To make sure the debugger is displaying values I added an int counter variable and did counter++ in the empty for loop and can see this incrementing in realtime expressions whilst the program is running and in the expression tab when the program is paused.


I do not know if it is a problem with the example, or a problem bringing the example into a much later S32DS.