<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32KのトピックRe: Issue with FTM2_CH0 (PTD0) and FTM2_CH2 (PTE4) Input Capture – Control Ends Up in DefaultISR</title>
    <link>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2061607#M46757</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;Seems that you are not using RTDs. In such case please refer to &lt;A href="https://www.nxp.com/docs/en/application-note/AN5303.pdf" target="_self"&gt;&lt;EM&gt;AN5303: Features and Operation Modes of FlexTimer Module on S32K&lt;/EM&gt;&lt;/A&gt; and to its respective associated file &lt;A href="https://www.nxp.com/webapp/Download?colCode=AN5303SW&amp;amp;docLang=en&amp;amp;_gl=1*1kj1646*_gcl_aw*R0NMLjE3MzgwMTQ0NDQuRUFJYUlRb2JDaE1Jbi0tUF8tLVdpd01WVmpuVUFSMFVuakFHRUFBWUFTQUFFZ0pVR1BEX0J3RQ..*_ga*MTIzODE1MzM1MC4xNzM3NDk2NTI0*_ga_WM5LE0KMSH*MTc0MTkwMDYwNS4xOTcuMS4xNzQxOTAyMjA4LjAuMC4w" target="_blank" rel="noopener"&gt;&lt;EM&gt;AN5303SW&lt;/EM&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Please test it with the following SW:&lt;BR /&gt;- S32 Design Studio (S32DS) for ARM 2.2&lt;BR /&gt;- S32 Software Development Kit (SDK) for S32K1xx 3.0.3&lt;/P&gt;
&lt;P&gt;On the other hand, we recommend you to use our last SW (S32DS 3.6 and RTD 2.0.0). Where you can find multiple &lt;EM&gt;Input Capture Unit (ICU)&lt;/EM&gt; examples:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-03-13_15-36-54.png" style="width: 253px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/328039i2002845BEA4DDBC2/image-dimensions/253x372?v=v2" width="253" height="372" role="button" title="2025-03-13_15-36-54.png" alt="2025-03-13_15-36-54.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2025 21:44:18 GMT</pubDate>
    <dc:creator>_Leo_</dc:creator>
    <dc:date>2025-03-13T21:44:18Z</dc:date>
    <item>
      <title>Issue with FTM2_CH0 (PTD0) and FTM2_CH2 (PTE4) Input Capture – Control Ends Up in DefaultISR</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2059643#M46659</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am trying to configure FTM2_CH0 (PTD0) and FTM2_CH2 (PTE4) for interrupt-based input capture on an S32K144. However, whenever I provide an input signal, the execution ends up in DefaultISR instead of the expected interrupt handler.&lt;/P&gt;&lt;P&gt;Additionally, when I attempt to set the channel mode using FTM_IC_DRV_SetChannelMode(), the control again ends up in DefaultISR.&lt;/P&gt;&lt;P&gt;I have attached my code, clock configuration, and the test function that I am using in main().&lt;/P&gt;&lt;P&gt;Any insights on what might be causing this issue would be greatly appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 15:08:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2059643#M46659</guid>
      <dc:creator>nik007</dc:creator>
      <dc:date>2025-03-11T15:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with FTM2_CH0 (PTD0) and FTM2_CH2 (PTE4) Input Capture – Control Ends Up in DefaultISR</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2061607#M46757</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thank you so much for your interest in our products and for using our community.&lt;/P&gt;
&lt;P&gt;Seems that you are not using RTDs. In such case please refer to &lt;A href="https://www.nxp.com/docs/en/application-note/AN5303.pdf" target="_self"&gt;&lt;EM&gt;AN5303: Features and Operation Modes of FlexTimer Module on S32K&lt;/EM&gt;&lt;/A&gt; and to its respective associated file &lt;A href="https://www.nxp.com/webapp/Download?colCode=AN5303SW&amp;amp;docLang=en&amp;amp;_gl=1*1kj1646*_gcl_aw*R0NMLjE3MzgwMTQ0NDQuRUFJYUlRb2JDaE1Jbi0tUF8tLVdpd01WVmpuVUFSMFVuakFHRUFBWUFTQUFFZ0pVR1BEX0J3RQ..*_ga*MTIzODE1MzM1MC4xNzM3NDk2NTI0*_ga_WM5LE0KMSH*MTc0MTkwMDYwNS4xOTcuMS4xNzQxOTAyMjA4LjAuMC4w" target="_blank" rel="noopener"&gt;&lt;EM&gt;AN5303SW&lt;/EM&gt;&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Please test it with the following SW:&lt;BR /&gt;- S32 Design Studio (S32DS) for ARM 2.2&lt;BR /&gt;- S32 Software Development Kit (SDK) for S32K1xx 3.0.3&lt;/P&gt;
&lt;P&gt;On the other hand, we recommend you to use our last SW (S32DS 3.6 and RTD 2.0.0). Where you can find multiple &lt;EM&gt;Input Capture Unit (ICU)&lt;/EM&gt; examples:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2025-03-13_15-36-54.png" style="width: 253px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/328039i2002845BEA4DDBC2/image-dimensions/253x372?v=v2" width="253" height="372" role="button" title="2025-03-13_15-36-54.png" alt="2025-03-13_15-36-54.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope it helps you.&lt;/P&gt;
&lt;P&gt;Have a nice day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 21:44:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2061607#M46757</guid>
      <dc:creator>_Leo_</dc:creator>
      <dc:date>2025-03-13T21:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with FTM2_CH0 (PTD0) and FTM2_CH2 (PTE4) Input Capture – Control Ends Up in DefaultISR</title>
      <link>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2067345#M47109</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am trying to measure frequency using FTM without triggering interrupt for each rising edge. I am measuring 2 signals on PTD0 and PTE4 using FTM0 CH2 and FTM2 CH2 respectively.&lt;BR /&gt;Should I mux PTD0 and PTE4 to clk of FTM0 and FTM2 respectively? or to the channels?&lt;BR /&gt;I have above configuration for pins and ftm.&lt;BR /&gt;&lt;BR /&gt;I am using ftm3 for polling the ftm0 and ftm2.&lt;BR /&gt;I am not getting correct values for pulse_count in the handler.&lt;BR /&gt;&lt;BR /&gt;For testing I am supplying PTD0 with 1khz, 3vpp and 1.5v offset signal.&lt;BR /&gt;I doubt gpio is not mapped correctly.&lt;BR /&gt;&lt;BR /&gt;#define INST_FTM_MEASURE_IN1 0U&lt;BR /&gt;#define INST_FTM_MEASURE_IN2 2U&lt;BR /&gt;#define INST_TIMER_TICK 3U&lt;BR /&gt;&lt;BR /&gt;static pin_settings_config_t g_gpio_mux_config[] = {&lt;BR /&gt;{&lt;BR /&gt;.base = PORTD,&lt;BR /&gt;.pinPortIdx = 0,&lt;BR /&gt;.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,&lt;BR /&gt;.driveSelect = PORT_LOW_DRIVE_STRENGTH,&lt;BR /&gt;.passiveFilter = false,&lt;BR /&gt;.mux = PORT_MUX_ALT2,&lt;BR /&gt;.pinLock = false,&lt;BR /&gt;.intConfig = PORT_DMA_INT_DISABLED,&lt;BR /&gt;.clearIntFlag = false,&lt;BR /&gt;.gpioBase = NULL,&lt;BR /&gt;.digitalFilter = false,&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;.base = PTE,&lt;BR /&gt;.pinPortIdx = 4,&lt;BR /&gt;.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,&lt;BR /&gt;.driveSelect = PORT_LOW_DRIVE_STRENGTH,&lt;BR /&gt;.passiveFilter = false,&lt;BR /&gt;.mux = PORT_MUX_ALT4,&lt;BR /&gt;.pinLock = false,&lt;BR /&gt;.intConfig = PORT_DMA_INT_DISABLED,&lt;BR /&gt;.clearIntFlag = false,&lt;BR /&gt;.gpioBase = NULL,&lt;BR /&gt;.digitalFilter = false,&lt;BR /&gt;},&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;static ftm_user_config_t ftmICConfig = {&lt;BR /&gt;.syncMethod = {&lt;BR /&gt;},&lt;BR /&gt;.ftmMode =FTM_MODE_INPUT_CAPTURE, /* Mode of operation for FTM */&lt;BR /&gt;.ftmPrescaler =FTM_CLOCK_DIVID_BY_64, /* FTM clock prescaler */&lt;BR /&gt;.ftmClockSource =FTM_CLOCK_SOURCE_EXTERNALCLK, /* FTM clock source */&lt;BR /&gt;.BDMMode =FTM_BDM_MODE_01, /* FTM debug mode */&lt;BR /&gt;.isTofIsrEnabled =false, /* Interrupt state */&lt;BR /&gt;.enableInitializationTrigger =true /* Initialization trigger */&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;static ftm_input_ch_param_t ftmICChannelConfig_IN = {&lt;BR /&gt;2, /* Channel id */&lt;BR /&gt;FTM_EDGE_DETECT, /* Input capture operation mode */&lt;BR /&gt;FTM_RISING_EDGE, /* Edge alignment mode */&lt;BR /&gt;FTM_NO_MEASUREMENT, /* Signal measurement operation type */&lt;BR /&gt;3U, /* Filter value */&lt;BR /&gt;true, /* Filter state (enabled/disabled) */&lt;BR /&gt;false, /* Continuous measurement state */&lt;BR /&gt;NULL, /* Vector of callbacks parameters for channels events */&lt;BR /&gt;NULL /* Vector of callbacks for channels events */&lt;BR /&gt;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;static ftm_input_param_t ftmICParamConfig = {&lt;BR /&gt;1U, /* Number of channel configurations */&lt;BR /&gt;0xFFFF, /* Maximum count value */&lt;BR /&gt;&amp;amp;ftmICChannelConfig_IN /* Channels configuration*/&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;static ftm_user_config_t ftmTickConfig = {&lt;BR /&gt;.syncMethod = {&lt;BR /&gt;.softwareSync = true, /* Software trigger state */&lt;BR /&gt;.hardwareSync0 = false, /* Hardware trigger 1 state */&lt;BR /&gt;.hardwareSync1 = false, /* Hardware trigger 2 state */&lt;BR /&gt;.hardwareSync2 = false,&lt;BR /&gt;.maxLoadingPoint = false,&lt;BR /&gt;.minLoadingPoint = false,&lt;BR /&gt;.inverterSync = FTM_SYSTEM_CLOCK,&lt;BR /&gt;.outRegSync = FTM_SYSTEM_CLOCK,&lt;BR /&gt;.maskRegSync = FTM_SYSTEM_CLOCK,&lt;BR /&gt;.initCounterSync = FTM_SYSTEM_CLOCK,&lt;BR /&gt;.autoClearTrigger = false,&lt;BR /&gt;.syncPoint = FTM_UPDATE_NOW /* Synchronization point */&lt;BR /&gt;},&lt;BR /&gt;.ftmMode = FTM_MODE_UP_TIMER, /* Mode of operation for FTM */&lt;BR /&gt;.ftmPrescaler = FTM_CLOCK_DIVID_BY_128, /* FTM clock prescaler */&lt;BR /&gt;.ftmClockSource = FTM_CLOCK_SOURCE_EXTERNALCLK,&lt;BR /&gt;.BDMMode = FTM_BDM_MODE_00,&lt;BR /&gt;.isTofIsrEnabled = true,&lt;BR /&gt;.enableInitializationTrigger = false&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;/* Timer mode configuration for flexTimer_mc_1 TimerConfig 0 */&lt;BR /&gt;static ftm_timer_param_t ftmTimerModeConfig = {&lt;BR /&gt;FTM_MODE_UP_TIMER, /* Counter mode */&lt;BR /&gt;0, /* Initial counter value */&lt;BR /&gt;37500 /* Final counter value */&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;SystemClockInit();&lt;BR /&gt;FTM_DRV_Init(3, &amp;amp;ftmTickConfig, &amp;amp;ftmStateTick);&lt;BR /&gt;&lt;BR /&gt;FTM_DRV_Init(INST_FTM_MEASURE_IN1, &amp;amp;ftmICConfig, &amp;amp;state_ess);&lt;BR /&gt;FTM_DRV_Init(INST_FTM_MEASURE_IN2, &amp;amp;ftmICConfig, &amp;amp;state_isens);&lt;BR /&gt;&lt;BR /&gt;FTM_DRV_InitInputCapture(INST_FTM_MEASURE_IN1, &amp;amp;ftmICParamConfig_ESS);&lt;BR /&gt;FTM_DRV_InitInputCapture(INST_FTM_MEASURE_IN2, &amp;amp;ftmICParamConfig_ISENS);&lt;BR /&gt;&lt;BR /&gt;FTM_DRV_InitCounter(INST_TIMER_TICK, &amp;amp;ftmTimerModeConfig);&lt;BR /&gt;FTM_DRV_CounterStart(INST_TIMER_TICK);&lt;BR /&gt;&lt;BR /&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;void FTM3_Ovf_Reload_IRQHandler(void)&lt;BR /&gt;{&lt;BR /&gt;in1_pulse_count = FTM_DRV_GetCounter(FTM0);&lt;BR /&gt;in1_pulse_count = FTM_DRV_GetCounter(FTM2);&lt;BR /&gt;&lt;BR /&gt;FTM_DRV_SetCounter(FTM0, 0);&lt;BR /&gt;FTM_DRV_SetCounter(FTM2, 0);&lt;BR /&gt;FTM_DRV_ClearStatusFlags(INST_TIMER_TICK, (uint32_t)FTM_TIME_OVER_FLOW_FLAG);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Mar 2025 15:05:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/Issue-with-FTM2-CH0-PTD0-and-FTM2-CH2-PTE4-Input-Capture-Control/m-p/2067345#M47109</guid>
      <dc:creator>nik007</dc:creator>
      <dc:date>2025-03-24T15:05:19Z</dc:date>
    </item>
  </channel>
</rss>

