Routing Comparator(LPCMP) Output to eMIOS (IPWM Mode) for Frequency Measurement

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Routing Comparator(LPCMP) Output to eMIOS (IPWM Mode) for Frequency Measurement

跳至解决方案
1,730 次查看
GaneshBhagwat
Contributor IV

Hi all,

I'm trying to route the output of the comparator to an eMIOS channel configured in IPWM mode, with the goal of measuring the frequency of the comparator's output. I’ve set up the TRGMUX configuration as shown below, but I’m not seeing any response on eMIOS channel 1 as expected.

Could someone please help me identify what might be missing or guide me on how to properly achieve this setup?

Thank you in advance!

GaneshBhagwat_0-1745231672484.png

 

0 项奖励
回复
1 解答
1,674 次查看
GaneshBhagwat
Contributor IV

Hi,

I've tested the IPWM module separately and successfully generated the CMP output to the LCU. This output was then routed and verified—I've attached the corresponding waveform below.

I also tried configuring IPWM as an interrupt source via TRGMUX, but I didn’t receive any interrupt events. Interestingly, when I connect the signal directly to the pin, IPWM reads the values correctly(so there is no issue in the IPWM).

However, I believe I found a workaround for the TRGMUX issue. By configuring the LCU output again as an eMIOS input pin, I’m able to retrieve the desired signal as required.

That said, I’m facing a problem when trying to measure the period. It works fine when the measurement mode is set to DutyCycle, but when I switch to Period mode (IP → IPWM), I don’t get any values.

Currently, I'm using the Emios_Icu_Ip_GetDutyCycleValues() function, since the GetPulseWidth() function doesn’t return any values. How can I retrieve the period value when the channel is configured in IP mode using eMIOS_ICU?

Would appreciate your help on this.

 

**I’ve attached the comparator output, along with a reference to the `Emios_Icu_Ip_GetPulseWidth()` function. Since this function doesn’t return a value, could you please clarify how it’s intended to be used? Is it updating any internal register or buffer that we should access separately?

GaneshBhagwat_0-1745402522021.pngGaneshBhagwat_1-1745402572591.jpeg

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,697 次查看
_Leo_
NXP TechSupport
NXP TechSupport

Hi,

Thank you so much for your interest in our products and for using our community.

Please try the following steps:

  • Ensure IPWM measurement works with an external signal connected directly to a pin configured as eMIOS.
  • Route the CMP out signal to an external pin (through TRGMUX) to ensure the desired signal, for debugging purposes.

Hope it helps you. Please let me know your results.

Have a nice day!

0 项奖励
回复
1,675 次查看
GaneshBhagwat
Contributor IV

Hi,

I've tested the IPWM module separately and successfully generated the CMP output to the LCU. This output was then routed and verified—I've attached the corresponding waveform below.

I also tried configuring IPWM as an interrupt source via TRGMUX, but I didn’t receive any interrupt events. Interestingly, when I connect the signal directly to the pin, IPWM reads the values correctly(so there is no issue in the IPWM).

However, I believe I found a workaround for the TRGMUX issue. By configuring the LCU output again as an eMIOS input pin, I’m able to retrieve the desired signal as required.

That said, I’m facing a problem when trying to measure the period. It works fine when the measurement mode is set to DutyCycle, but when I switch to Period mode (IP → IPWM), I don’t get any values.

Currently, I'm using the Emios_Icu_Ip_GetDutyCycleValues() function, since the GetPulseWidth() function doesn’t return any values. How can I retrieve the period value when the channel is configured in IP mode using eMIOS_ICU?

Would appreciate your help on this.

 

**I’ve attached the comparator output, along with a reference to the `Emios_Icu_Ip_GetPulseWidth()` function. Since this function doesn’t return a value, could you please clarify how it’s intended to be used? Is it updating any internal register or buffer that we should access separately?

GaneshBhagwat_0-1745402522021.pngGaneshBhagwat_1-1745402572591.jpeg

 

0 项奖励
回复
1,571 次查看
GaneshBhagwat
Contributor IV
I have resolved this issue. can close the same
0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2083829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%B0%86%E6%AF%94%E8%BE%83%E5%99%A8%20(LPCMP)%20%E8%BE%93%E5%87%BA%E8%B7%AF%E7%94%B1%E8%87%B3%20eMIOS%20(IPWM%20%E6%A8%A1%E5%BC%8F)%20%E8%BF%9B%E8%A1%8C%E9%A2%91%E7%8E%87%E6%B5%8B%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2083829%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E5%A4%A7%E5%AE%B6%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E5%B0%9D%E8%AF%95%E5%B0%86%E6%AF%94%E8%BE%83%E5%99%A8%E7%9A%84%E8%BE%93%E5%87%BA%E8%B7%AF%E7%94%B1%E5%88%B0%E9%85%8D%E7%BD%AE%E4%B8%BA%20IPWM%20%E6%A8%A1%E5%BC%8F%E7%9A%84%20eMIOS%20%E9%80%9A%E9%81%93%EF%BC%8C%E7%9B%AE%E7%9A%84%E6%98%AF%E6%B5%8B%E9%87%8F%E6%AF%94%E8%BE%83%E5%99%A8%E8%BE%93%E5%87%BA%E7%9A%84%E9%A2%91%E7%8E%87%E3%80%82%E6%88%91%E5%B7%B2%E7%BB%8F%E8%AE%BE%E7%BD%AE%E4%BA%86%20TRGMUX%20%E9%85%8D%E7%BD%AE%EF%BC%8C%E5%A6%82%E4%B8%8B%E6%89%80%E7%A4%BA%EF%BC%8C%E4%BD%86%E6%88%91%E6%B2%A1%E6%9C%89%E7%9C%8B%E5%88%B0%20eMIOS%20%E9%80%9A%E9%81%93%201%20%E4%B8%8A%E5%87%BA%E7%8E%B0%E9%A2%84%E6%9C%9F%E7%9A%84%E4%BB%BB%E4%BD%95%E5%93%8D%E5%BA%94%E3%80%82%3C%2FP%3E%3CP%3E%E6%9C%89%E4%BA%BA%E8%83%BD%E5%B8%AE%E6%88%91%E6%89%BE%E5%87%BA%E5%8F%AF%E8%83%BD%E7%BC%BA%E5%B0%91%E4%BB%80%E4%B9%88%E6%88%96%E6%8C%87%E5%AF%BC%E6%88%91%E5%A6%82%E4%BD%95%E6%AD%A3%E7%A1%AE%E5%AE%9E%E7%8E%B0%E6%AD%A4%E8%AE%BE%E7%BD%AE%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%8F%90%E5%89%8D%E8%B0%A2%E8%B0%A2%EF%BC%81%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22GaneshBhagwat_0-1745231672484.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22GaneshBhagwat_0-1745231672484.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F334062iF5699A8BA88F338C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22GaneshBhagwat_0-1745231672484.png%22%20alt%3D%22GaneshBhagwat_0-1745231672484.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2089500%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E5%B0%86%E6%AF%94%E8%BE%83%E5%99%A8%EF%BC%88LPCMP%EF%BC%89%E8%BE%93%E5%87%BA%E8%B7%AF%E7%94%B1%E5%88%B0eMIOS%EF%BC%88IPWM%E6%A8%A1%E5%BC%8F%EF%BC%89%E8%BF%9B%E8%A1%8C%E9%A2%91%E7%8E%87%E6%B5%8B%E9%87%8F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2089500%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E6%88%91%E5%B7%B2%E7%BB%8F%E8%A7%A3%E5%86%B3%E4%BA%86%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E3%80%82%E5%8F%AF%E4%BB%A5%E5%85%B3%E9%97%AD%E7%9B%B8%E5%90%8C%E7%9A%84%3C%2FLINGO-BODY%3E