frequency measurement example code for the s32k3xx

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

frequency measurement example code for the s32k3xx

Jump to solution
945 Views
gayancho
Contributor II

Hi all,

I am working with an S32K3 series MCU and I want to measure the frequency of an external signal coming on a GPIO pin using the eMIOS peripheral. I have checked the S32K3 reference manual, S32 Design Studio, MCUXpresso Config Tools, and available SDK examples, but I could not find any clear documentation or example that explains how to configure eMIOS for frequency measurement, including pin routing, channel mode selection, clock configuration, or the required settings in the .mex file. I would appreciate it if you could guide me on the correct eMIOS mode to use for this purpose or share any reference example, code snippet, or configuration screenshot that demonstrates a working frequency measurement setup on S32K3.

Tags (1)
0 Kudos
Reply
1 Solution
578 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

This seems similar to the discussion in the S32K344 MCAL IPWM ICU CAPTURE: Please call Emios_Icu_Ip_IrqHandler first, and then call Emios_Icu_Ip_GetDutyCycleValues.

View solution in original post

0 Kudos
Reply
9 Replies
784 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Please refer to these examples for configuring eMIOS in IPWM mode:
Example S32K344 eMIOS DS3.5 RTD500
S32K344_Example_Emios_Icu_IPWM_measurement_DS34_RTD_100_v2
Example IP S32K312 EMIO PWM Generation & Duty capture using Polling DS3.5 RTD300
Example IP S32K312 EMIO PWM Generation & Duty capture using Interrupt DS3.5 RTD300
Example ASR S32K312 EMIO PWM Generation & Duty capture using Polling DS3.5 RTD300
Example ASR S32K312 EMIO PWM Generation & Duty capture using Interrupt DS3.5 RTD300

Please note that the S32K3 projects are usually used with S32DS(S32 Configuration Tool) or EBTresos as configuration tools, and not with MCUXpresso Config Tools.


Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "ACCEPT AS SOLUTION" 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.
-------------------------------------------------------------------------------

0 Kudos
Reply
766 Views
gayancho
Contributor II

Hi @Robin_Shen,

I am using the Example S32K344 eMIOS DS3.5 RTD500 as my base code. I modified the project to measure input frequency by configuring eMIOS_1 Channel 7 as an input (IPWM mode). I updated the S32 Configuration Tool accordingly and added the required changes in the main file.

I am reading the measured value using the Ipwm_duty_cycle_array(checked inside the watchdog task). However, even when no external signal is applied on PTA24, the measured value is always 100.

Could you please explain why a constant value is reported without any input signal? Is this expected behavior due to default pin state, internal pull-up, clock source, or IPWM configuration? I have attached snapshots for reference.

gayancho_0-1768217777609.png

 

Tags (1)
0 Kudos
Reply
701 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

If you want to use polling method instead of interrupt method, please poll the status via Emios_Icu_Ip_GetInputState before calling Emios_Icu_Ip_GetDutyCycleValues.

    	while(TRUE != Emios_Icu_Ip_GetInputState(INSTANCE_1, CHANNEL_7)){} 

    	Emios_Icu_Ip_GetPulseWidth(INSTANCE_1, CHANNEL_7);
    	Emios_Icu_Ip_GetDutyCycleValues(INSTANCE_1, CHANNEL_7, &Ipwm_duty_cycle);
    	Ipwm_duty_cycle_array[index] = (Ipwm_duty_cycle.ActiveTime * 100) / Ipwm_duty_cycle.PeriodTime;

 

0 Kudos
Reply
631 Views
gayancho
Contributor II

Hi @Robin_Shen ,

As I want to use interrupt-based measurement, I unchecked IcuSignalMeasureWithoutInterrupt (please refer to the image below) and modified the main.c according to the interrupt-based example code.

Currently, the IRQ handler is triggered, which confirms that the interrupt configuration is working. However, the measured ActiveTime and Period

gayancho_0-1768458630668.png

 

Time values are always 0.

Could you please help explain why the interrupt is generated but both timing values remain zero? Is this related to IPWM mode configuration, edge selection, signal level on the pin, or missing ICU start/notification API calls?

I have attached the configuration snapshot for reference. In this code same as the example code but I just changed the channel 5 instead of 7.

0 Kudos
Reply
579 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

This seems similar to the discussion in the S32K344 MCAL IPWM ICU CAPTURE: Please call Emios_Icu_Ip_IrqHandler first, and then call Emios_Icu_Ip_GetDutyCycleValues.

0 Kudos
Reply
563 Views
gayancho
Contributor II

Hi @Robin_Shen ,

Thank you for the clarification, the issue is resolved now and the interrupt-based measurement is working as expected.I have one additional question. I want to know how to run the eMIOS module using an external clock source? Could you please guide me on what key configuration changes are required for this?

0 Kudos
Reply
265 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

You are welcome. 
I may not have understood your question. Please correct me if I am wrong.

I see that your Emios_Icu has IcuEmiosBusSelect set to EMIOS_ICU_BUS_A. Would you like to change it to something else?

By the way, the S32K3_RTD_Training_eMIOS_public.pdf file in the S32K311 EMIOS GPT might be helpful to you.

Please post a new question in community you have any questions that are not related to the original topic of an existing case. It helps to keep it clear.

0 Kudos
Reply
93 Views
gayancho
Contributor II

Hi @Robin_Shen

I am trying to measure the input frequency on PTE25 (eMIOS1 Channel 5). I am applying a 10 Hz signal from a DSO, and I have verified that the input signal is stable. However, the measured frequency value is unstable and fluctuates around 900–1200, even though the input is only 10 Hz. To debug this, I changed the IcuSignalMeasurementProperty to ICU_PERIOD_TIME and updated the IRQ handler as shown below:

void EMIOS1_4_IRQ_Customized(void)

{

    Emios_Icu_Ip_IrqHandler(1, 5);

    period_time = Emios_Icu_Ip_GetTimeElapsed(1, 5);

    if (period_time)

   {

        uint64_t emios_freq = 48000000ULL; // hardcoded

        signal_frequency = emios_freq / period_time; captured = 1;

   }

}

Even after these changes, the frequency value remains unstable.

Could you please help me understand why the measured frequency is incorrect and unstable for a low-frequency input, and what configuration changes are required to correctly measure a 10 Hz signal using eMIOS/ICU?

gayancho_0-1768999338824.png

IMG_20260121_181316.jpeg

Tags (1)
0 Kudos
Reply
87 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

I will be on leave until February 2nd. I suggest you post a new question; my colleague will provide technical support.
Thank you for your understanding.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2290971%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Efrequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290971%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20working%20with%20an%20S32K3%20series%20MCU%20and%20I%20want%20to%20measure%20the%20frequency%20of%20an%20external%20signal%20coming%20on%20a%20GPIO%20pin%20using%20the%20eMIOS%20peripheral.%20I%20have%20checked%20the%20S32K3%20reference%20manual%2C%20S32%20Design%20Studio%2C%20MCUXpresso%20Config%20Tools%2C%20and%20available%20SDK%20examples%2C%20but%20I%20could%20not%20find%20any%20clear%20documentation%20or%20example%20that%20explains%20how%20to%20configure%20eMIOS%20for%20frequency%20measurement%2C%20including%20pin%20routing%2C%20channel%20mode%20selection%2C%20clock%20configuration%2C%20or%20the%20required%20settings%20in%20the%20.mex%20file.%20I%20would%20appreciate%20it%20if%20you%20could%20guide%20me%20on%20the%20correct%20eMIOS%20mode%20to%20use%20for%20this%20purpose%20or%20share%20any%20reference%20example%2C%20code%20snippet%2C%20or%20configuration%20screenshot%20that%20demonstrates%20a%20working%20frequency%20measurement%20setup%20on%20S32K3.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291479%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291479%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3EPlease%20refer%20to%20these%20examples%20for%20configuring%20eMIOS%20in%20%3CSTRONG%3EIPWM%3C%2FSTRONG%3E%20mode%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-S32K344-eMIOS-DS3-5-RTD500%2Fta-p%2F1992245%22%20target%3D%22_self%22%3EExample%20S32K344%20eMIOS%20DS3.5%20RTD500%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FS32K344-Example-Emios-Icu-IPWM-measurement-DS34-RTD-100-v2%2Fta-p%2F1416327%22%20target%3D%22_self%22%3ES32K344_Example_Emios_Icu_IPWM_measurement_DS34_RTD_100_v2%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-IP-S32K312-EMIO-PWM-Generation-amp-Duty-capture-using%2Fta-p%2F2011642%22%20target%3D%22_self%22%3EExample%20IP%20S32K312%20EMIO%20PWM%20Generation%20%26amp%3B%20Duty%20capture%20using%20Polling%20DS3.5%20RTD300%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-IP-S32K312-EMIO-PWM-Generation-amp-Duty-capture-using%2Fta-p%2F2011634%22%20target%3D%22_self%22%3EExample%20IP%20S32K312%20EMIO%20PWM%20Generation%20%26amp%3B%20Duty%20capture%20using%20Interrupt%20DS3.5%20RTD300%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-ASR-S32K312-EMIO-PWM-Generation-amp-Duty-capture-using%2Fta-p%2F2011665%22%20target%3D%22_self%22%3EExample%20ASR%20S32K312%20EMIO%20PWM%20Generation%20%26amp%3B%20Duty%20capture%20using%20Polling%20DS3.5%20RTD300%3C%2FA%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K-Knowledge-Base%2FExample-ASR-S32K312-EMIO-PWM-Generation-amp-Duty-capture-using%2Fta-p%2F2011680%22%20target%3D%22_self%22%3EExample%20ASR%20S32K312%20EMIO%20PWM%20Generation%20%26amp%3B%20Duty%20capture%20using%20Interrupt%20DS3.5%20RTD300%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EPlease%20note%20that%20the%20S32K3%20projects%20are%20usually%20used%20with%20%3CSTRONG%3ES32DS%3C%2FSTRONG%3E(S32%20Configuration%20Tool)%26nbsp%3Bor%20%3CSTRONG%3EEBTresos%3C%2FSTRONG%3E%20as%20configuration%20tools%2C%20and%20not%20with%20%3CSTRONG%3EMCUXpresso%20Config%20Tools%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3ERobin%3CBR%20%2F%3E-------------------------------------------------------------------------------%3CBR%20%2F%3ENote%3A%3CBR%20%2F%3E-%20If%20this%20post%20answers%20your%20question%2C%20please%20click%20the%20%22ACCEPT%20AS%20SOLUTION%22%20button.%20Thank%20you!%3C%2FP%3E%0A%3CP%3E-%20We%20are%20following%20threads%20for%207%20weeks%20after%20the%20last%20post%2C%20later%20replies%20are%20ignored%3CBR%20%2F%3EPlease%20open%20a%20new%20thread%20and%20refer%20to%20the%20closed%20one%2C%20if%20you%20have%20a%20related%20question%20at%20a%20later%20point%20in%20time.%3CBR%20%2F%3E-------------------------------------------------------------------------------%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291718%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291718%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F57959%22%20target%3D%22_blank%22%3E%40Robin_Shen%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EI%20am%20using%20the%20Example%20S32K344%20eMIOS%20DS3.5%20RTD500%20as%20my%20base%20code.%20I%20modified%20the%20project%20to%20measure%20input%20frequency%20by%20configuring%20eMIOS_1%20Channel%207%20as%20an%20input%20(IPWM%20mode).%20I%20updated%20the%20S32%20Configuration%20Tool%20accordingly%20and%20added%20the%20required%20changes%20in%20the%20main%20file.%3C%2FP%3E%3CP%3EI%20am%20reading%20the%20measured%20value%20using%20the%20%3CSPAN%3EIpwm_duty_cycle_array%3C%2FSPAN%3E(checked%20inside%20the%20watchdog%20task).%20However%2C%20even%20when%20no%20external%20signal%20is%20applied%20on%20PTA24%2C%20the%20measured%20value%20is%20always%20100.%3C%2FP%3E%3CP%3ECould%20you%20please%20explain%20why%20a%20constant%20value%20is%20reported%20without%20any%20input%20signal%3F%20Is%20this%20expected%20behavior%20due%20to%20default%20pin%20state%2C%20internal%20pull-up%2C%20clock%20source%2C%20or%20IPWM%20configuration%3F%20I%20have%20attached%20snapshots%20for%20reference.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768217777609.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F372466i853AD41904500F59%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gayancho_0-1768217777609.png%22%20alt%3D%22gayancho_0-1768217777609.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2292924%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2292924%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EIf%20you%20want%20to%20use%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32k3-PWM-Capture-Duty-Cycle-only-works-in-IRQ%2Ftd-p%2F1880219%22%20target%3D%22_self%22%3Epolling%20method%3C%2FA%3E%3CSPAN%3E%26nbsp%3Binstead%20of%20interrupt%20method%2C%20please%20poll%20the%20status%20via%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEmios_Icu_Ip_GetInputState%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bbefore%20calling%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3EEmios_Icu_Ip_GetDutyCycleValues%3C%2FSTRONG%3E%3CSPAN%3E.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%09while(TRUE%20!%3D%20Emios_Icu_Ip_GetInputState(INSTANCE_1%2C%20CHANNEL_7))%7B%7D%20%0A%0A%20%20%20%20%09Emios_Icu_Ip_GetPulseWidth(INSTANCE_1%2C%20CHANNEL_7)%3B%0A%20%20%20%20%09Emios_Icu_Ip_GetDutyCycleValues(INSTANCE_1%2C%20CHANNEL_7%2C%20%26amp%3BIpwm_duty_cycle)%3B%0A%20%20%20%20%09Ipwm_duty_cycle_array%5Bindex%5D%20%3D%20(Ipwm_duty_cycle.ActiveTime%20*%20100)%20%2F%20Ipwm_duty_cycle.PeriodTime%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2293953%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2293953%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F57959%22%20target%3D%22_blank%22%3E%40Robin_Shen%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EAs%20I%20want%20to%20use%20interrupt-based%20measurement%2C%20I%20unchecked%20%3CSTRONG%3EIcuSignalMeasureWithoutInterrupt%3C%2FSTRONG%3E%20(please%20refer%20to%20the%20image%20below)%20and%20modified%20the%20main.c%20according%20to%20the%20interrupt-based%20example%20code.%3C%2FP%3E%3CP%3ECurrently%2C%20the%20IRQ%20handler%20is%20triggered%2C%20which%20confirms%20that%20the%20interrupt%20configuration%20is%20working.%20However%2C%20the%20measured%20%3CSTRONG%3EActiveTime%3C%2FSTRONG%3E%20and%20%3CSTRONG%3EPeriod%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_0-1768458630668.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F372901i6170B9745FBCF0E0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gayancho_0-1768458630668.png%22%20alt%3D%22gayancho_0-1768458630668.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ETime%3C%2FSTRONG%3E%20values%20are%20always%200.%3C%2FP%3E%3CP%3ECould%20you%20please%20help%20explain%20why%20the%20interrupt%20is%20generated%20but%20both%20timing%20values%20remain%20zero%3F%20Is%20this%20related%20to%20IPWM%20mode%20configuration%2C%20edge%20selection%2C%20signal%20level%20on%20the%20pin%2C%20or%20missing%20ICU%20start%2Fnotification%20API%20calls%3F%3C%2FP%3E%3CP%3EI%20have%20attached%20the%20configuration%20snapshot%20for%20reference.%20In%20this%20code%20same%20as%20the%20example%20code%20but%20I%20just%20changed%20the%20channel%205%20instead%20of%207.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294703%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThis%20seems%20similar%20to%20the%20discussion%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K344-MCAL-IPWM-ICU-CAPTURE%2Fm-p%2F1541889%22%20target%3D%22_self%22%3ES32K344%20MCAL%20IPWM%20ICU%20CAPTURE%3C%2FA%3E%3A%20Please%20call%20%3CSTRONG%3EEmios_Icu_Ip_IrqHandler%3C%2FSTRONG%3E%20first%2C%20and%20then%20call%20%3CSTRONG%3EEmios_Icu_Ip_GetDutyCycleValues%3C%2FSTRONG%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2294974%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2294974%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F57959%22%20target%3D%22_blank%22%3E%40Robin_Shen%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20clarification%2C%20the%20issue%20is%20resolved%20now%20and%20the%20interrupt-based%20measurement%20is%20working%20as%20expected.I%20have%20one%20additional%20question.%26nbsp%3BI%20want%20to%20know%20how%20to%20run%20the%20eMIOS%20module%20using%20an%20external%20clock%20source%3F%26nbsp%3BCould%20you%20please%20guide%20me%20on%20what%20key%20configuration%20changes%20are%20required%20for%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2296343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296343%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYou%20are%20welcome.%26nbsp%3B%3CBR%20%2F%3EI%20may%20not%20have%20understood%20your%20question.%20Please%20correct%20me%20if%20I%20am%20wrong.%3C%2FP%3E%0A%3CP%3EI%20see%20that%20your%20%3CSTRONG%3EEmios_Icu%3C%2FSTRONG%3E%20has%20%3CSTRONG%3EIcuEmiosBusSelect%3C%2FSTRONG%3E%20set%20to%20%3CSTRONG%3EEMIOS_ICU_BUS_A%3C%2FSTRONG%3E.%20Would%20you%20like%20to%20change%20it%20to%20something%20else%3F%3C%2FP%3E%0A%3CP%3EBy%20the%20way%2C%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpwmxy87654%2Fattachments%2Fpwmxy87654%2FS32K%2F46929%2F1%2FS32K3_RTD_Training_eMIOS_public.pdf%22%20target%3D%22_self%22%3ES32K3_RTD_Training_eMIOS_public.pdf%3C%2FA%3E%20file%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FS32K%2FS32K311-EMIOS-GPT%2Fm-p%2F2063799%22%20target%3D%22_self%22%3ES32K311%20EMIOS%20GPT%3C%2FA%3E%20might%20be%20helpful%20to%20you.%3C%2FP%3E%0A%3CP%3EPlease%20post%20a%20new%20question%20in%20community%26nbsp%3Byou%20have%20any%20questions%20that%20are%20not%20related%20to%20the%20original%20topic%20of%20an%20existing%20case.%20It%20helps%20to%20keep%20it%20clear.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2296688%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20frequency%20measurement%20example%20code%20for%20the%20s32k3xx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2296688%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F57959%22%20target%3D%22_blank%22%3E%40Robin_Shen%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20measure%20input%20frequency%20on%20multiple%20eMIOS%20channels.%20When%20I%20configure%20and%20enable%20only%20one%20channel%2C%20the%20project%20builds%20and%20works%20correctly.%20However%2C%20when%20I%20enable%20a%20second%20eMIOS%2FICU%20channel%20for%20frequency%20measurement%2C%20I%20immediately%20get%20configuration%20errors%20and%20the%20project%20fails%20to%20build.%3C%2FP%3E%3CP%3EI%20have%20attached%20a%20screenshot%20of%20the%20configuration%20error%20for%20reference.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gayancho_2-1768912586509.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_2-1768912586509.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373507i59AA6A02C7A923C4%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gayancho_2-1768912586509.png%22%20alt%3D%22gayancho_2-1768912586509.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gayancho_4-1768912621370.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_4-1768912621370.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373509iACADCF6AC9950CD8%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gayancho_4-1768912621370.png%22%20alt%3D%22gayancho_4-1768912621370.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22gayancho_1-1768912552742.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22gayancho_1-1768912552742.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F373506iBC92E61BC8F28A53%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22gayancho_1-1768912552742.png%22%20alt%3D%22gayancho_1-1768912552742.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E