Input Capture - FTM signal measurement in HOST S32K144 EVB

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Input Capture - FTM signal measurement in HOST S32K144 EVB

543件の閲覧回数
Coding_Torque-SDRS
Contributor III

Hi Members!

     I'm implementing FTM input capture in Host S32K144 EVB and Generating PWM signal from Host EVB - My host can able to capture it but I'm having confusion in the FTM_DRV_GetInputCaptureMeasurement(INST_FLEXTIMER_IC_1, 0U) function. it gives out measurementResults[channel] as output. I've attached the screenshot that has varying values. Please let me know what its printing. Screenshot has been attached as well.

As per my understanding its printing edges time stamps. but in milliseconds or microseconds or what it is printing?

IC_TEST_2024-03-11 114716.png

From the target EVB i'm generating 100khz PWM with 10% 20% 30% 50% dutycycle with the help of switch. 

HOST CODE:

/* Wait a number of cycles for the PWM to reach stability */
delayCycles(0x7FFFFU);

/* Get the latest captured pulse width */
inputCaptureMeas = FTM_DRV_GetInputCaptureMeasurement(INST_FLEXTIMER_IC_1, 0U);

/* Calculate duty cycle */
float dutyCyclePercentage = calculateDutyCycle(inputCaptureMeas, frequency);

/* Print duty cycle */
sprintf(txBuff, "Measured duty cycle: %.6f%%\r\n", dutyCyclePercentage);
print(txBuff); 

 

タグ(3)
0 件の賞賛
返信
1 返信

494件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi

Did you refer to the ftm_signal_measurement_s32k144 example in S32DS v3.4+S32K1 SDK 4.0.3?
If so, please read the manual of that example: file:///C:/NXP/S32DS.3.4/S32DS/software/S32SDK_S32K1XX_RTM_4.0.3/doc/html_S32K144/ftm_signal_measure...

file:///C:/NXP/S32DS.3.4/S32DS/software/S32SDK_S32K1xx_RTM_4.0.3/doc/html_S32K144/group__ftm__ic__driver.html#ga6391b02ad426752cb785d844ed8f8e6a

See also: Unable to Interpret data received from FTM Input Capture

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

タグ(1)
0 件の賞賛
返信