<?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>topic frdmmcxe31b_emios_input_capture kEMIOS_PEC_Continuous in MCX Microcontrollers</title>
    <link>https://community.nxp.com/t5/MCX-Microcontrollers/frdmmcxe31b-emios-input-capture-kEMIOS-PEC-Continuous/m-p/2344040#M5137</link>
    <description>&lt;P&gt;I am working with the FRDM-MCXE31B development board, and I want to modify the frdmmcxe31b_emios_input_capture example program to enable the continuous counting mode for eMIOS. I have made the modifications as follows,&lt;BR /&gt;EMIOS_GetDefaultConfig(&amp;amp;emiosConfig);&lt;/P&gt;&lt;P&gt;emiosConfig.prescale = EXAMPLE_EMIOS_CLK_FREQ / EXAMPLE_COUNTERBUS_FREQ - 1U;&lt;BR /&gt;emiosConfig.useGlobalTimeBase = true;&lt;BR /&gt;EMIOS_Init(EXAMPLE_EMIOS, &amp;amp;emiosConfig);&lt;/P&gt;&lt;P&gt;ucMCConfig.period = 0xFFFFU;&lt;BR /&gt;ucMCConfig.prescale = 0U;&lt;BR /&gt;ucMCConfig.ucMode = kEMIOS_MC_UpCount;&lt;BR /&gt;ucMCConfig.clockSource = kEMIOS_ClkSrcInternal;&lt;BR /&gt;ucMCConfig.prescalerSource = kEMIOS_Prescaler_PrescaledClock;&lt;BR /&gt;ucMCConfig.counterResetTiming = kEMIOS_ResetMatchEnd;&lt;BR /&gt;ucMCConfig.reloadOutputDelay = 0U;&lt;BR /&gt;ucMCConfig.enableFreeze = false;&lt;BR /&gt;EMIOS_ConfigModulusCounter(EXAMPLE_EMIOS, &amp;amp;ucMCConfig, EXAMPLE_COUNTERBUS_CHANNEL);&lt;/P&gt;&lt;P&gt;ucICConfig.ucMode = kEMIOS_PEC_Continuous;//kEMIOS_IPWM;&lt;BR /&gt;ucICConfig.counterBus = kEMIOS_CounterBus_A;&lt;BR /&gt;ucICConfig.edgePolarity = kEMIOS_IC_RisingEdge;&lt;BR /&gt;ucICConfig.filterClock = kEMIOS_Filter_PrescaledClock;&lt;BR /&gt;ucICConfig.filterWidth = kEMIOS_Filter_16_Cycle;&lt;BR /&gt;ucICConfig.enableFreeze = false;&lt;BR /&gt;ucICConfig.startTime = 0x90;&lt;BR /&gt;ucICConfig.endTime = 0x800;&lt;BR /&gt;EMIOS_ConfigInputCapture(EXAMPLE_EMIOS, &amp;amp;ucICConfig, EXAMPLE_IC_CHANNEL);&lt;/P&gt;&lt;P&gt;// EMIOS_EnableUCInterrupt(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);&lt;BR /&gt;// (void)EnableIRQ(EXAMPLE_EMIOS_IRQn);&lt;/P&gt;&lt;P&gt;EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_COUNTERBUS_CHANNEL);&lt;BR /&gt;EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);&lt;BR /&gt;EMIOS_EnableGlobalPrescaler(EXAMPLE_EMIOS);&lt;BR /&gt;but I checked the relevant registers and found no changes at all. Could you please tell me how to configure it correctly, and which register I should read to get the counter value?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2026 06:41:42 GMT</pubDate>
    <dc:creator>hyf_grass</dc:creator>
    <dc:date>2026-04-02T06:41:42Z</dc:date>
    <item>
      <title>frdmmcxe31b_emios_input_capture kEMIOS_PEC_Continuous</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/frdmmcxe31b-emios-input-capture-kEMIOS-PEC-Continuous/m-p/2344040#M5137</link>
      <description>&lt;P&gt;I am working with the FRDM-MCXE31B development board, and I want to modify the frdmmcxe31b_emios_input_capture example program to enable the continuous counting mode for eMIOS. I have made the modifications as follows,&lt;BR /&gt;EMIOS_GetDefaultConfig(&amp;amp;emiosConfig);&lt;/P&gt;&lt;P&gt;emiosConfig.prescale = EXAMPLE_EMIOS_CLK_FREQ / EXAMPLE_COUNTERBUS_FREQ - 1U;&lt;BR /&gt;emiosConfig.useGlobalTimeBase = true;&lt;BR /&gt;EMIOS_Init(EXAMPLE_EMIOS, &amp;amp;emiosConfig);&lt;/P&gt;&lt;P&gt;ucMCConfig.period = 0xFFFFU;&lt;BR /&gt;ucMCConfig.prescale = 0U;&lt;BR /&gt;ucMCConfig.ucMode = kEMIOS_MC_UpCount;&lt;BR /&gt;ucMCConfig.clockSource = kEMIOS_ClkSrcInternal;&lt;BR /&gt;ucMCConfig.prescalerSource = kEMIOS_Prescaler_PrescaledClock;&lt;BR /&gt;ucMCConfig.counterResetTiming = kEMIOS_ResetMatchEnd;&lt;BR /&gt;ucMCConfig.reloadOutputDelay = 0U;&lt;BR /&gt;ucMCConfig.enableFreeze = false;&lt;BR /&gt;EMIOS_ConfigModulusCounter(EXAMPLE_EMIOS, &amp;amp;ucMCConfig, EXAMPLE_COUNTERBUS_CHANNEL);&lt;/P&gt;&lt;P&gt;ucICConfig.ucMode = kEMIOS_PEC_Continuous;//kEMIOS_IPWM;&lt;BR /&gt;ucICConfig.counterBus = kEMIOS_CounterBus_A;&lt;BR /&gt;ucICConfig.edgePolarity = kEMIOS_IC_RisingEdge;&lt;BR /&gt;ucICConfig.filterClock = kEMIOS_Filter_PrescaledClock;&lt;BR /&gt;ucICConfig.filterWidth = kEMIOS_Filter_16_Cycle;&lt;BR /&gt;ucICConfig.enableFreeze = false;&lt;BR /&gt;ucICConfig.startTime = 0x90;&lt;BR /&gt;ucICConfig.endTime = 0x800;&lt;BR /&gt;EMIOS_ConfigInputCapture(EXAMPLE_EMIOS, &amp;amp;ucICConfig, EXAMPLE_IC_CHANNEL);&lt;/P&gt;&lt;P&gt;// EMIOS_EnableUCInterrupt(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);&lt;BR /&gt;// (void)EnableIRQ(EXAMPLE_EMIOS_IRQn);&lt;/P&gt;&lt;P&gt;EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_COUNTERBUS_CHANNEL);&lt;BR /&gt;EMIOS_EnableUCPrescaler(EXAMPLE_EMIOS, EXAMPLE_IC_CHANNEL);&lt;BR /&gt;EMIOS_EnableGlobalPrescaler(EXAMPLE_EMIOS);&lt;BR /&gt;but I checked the relevant registers and found no changes at all. Could you please tell me how to configure it correctly, and which register I should read to get the counter value?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2026 06:41:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/frdmmcxe31b-emios-input-capture-kEMIOS-PEC-Continuous/m-p/2344040#M5137</guid>
      <dc:creator>hyf_grass</dc:creator>
      <dc:date>2026-04-02T06:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: frdmmcxe31b_emios_input_capture kEMIOS_PEC_Continuous</title>
      <link>https://community.nxp.com/t5/MCX-Microcontrollers/frdmmcxe31b-emios-input-capture-kEMIOS-PEC-Continuous/m-p/2344529#M5141</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/231665"&gt;@hyf_grass&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;
&lt;P&gt;Based on your code, please try the following modifications:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Delete the following two lines, or set both of them to 0:&lt;BR /&gt;ucICConfig.startTime = 0x90;&lt;BR /&gt;ucICConfig.endTime = 0x800;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Make sure the CounterBus is enabled:&lt;BR /&gt;ucMCConfig.ucMode = kEMIOS_MC_UpCount; // Up counter mode&lt;BR /&gt;ucMCConfig.period = 0xFFFF; // Maximum counter value&lt;BR /&gt;ucMCConfig.prescale = 0; // No prescaling, increases counting speed&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;The pulse count value is read from register A, and you can use the SDK API:&lt;BR /&gt;EMIOS_GetAn(EMIOS_Type *base, uint8_t channel)&lt;/P&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;BR&lt;/DIV&gt;
&lt;DIV&gt;Alice&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2026 11:10:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCX-Microcontrollers/frdmmcxe31b-emios-input-capture-kEMIOS-PEC-Continuous/m-p/2344529#M5141</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2026-04-02T11:10:03Z</dc:date>
    </item>
  </channel>
</rss>

