Using PWT module

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

Using PWT module

596 Views
ricardcomas
Contributor III

Hi everyone, i don't get PWT work,i must initialize module and get result of PPW with function PWT_PDD_GetPositiveWidth(PWT_BASE_PTR), REALLY?¿ o don't need interrupts here, i need get value by polling, i found this code:

Its look like a lot basic, how can use correctly?¿

Captura.PNG

I need get positive pulse width by polling,so i tought only init component and get its value.

Have a sample code somebody?¿

thanks so much

Tags (3)
0 Kudos
1 Reply

467 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Ricard Comas,

You may need to polling check the state of PWT_R1[PWTRDY].

PWT_R1[PWTRDY].png
PWT_PDD_GetInterruptFlags function can be used.

PWT_PDD_GetInterruptFlags.png

I don't have the PWT sample code using Processor Expert. But you can find the PWT_demo in FRDM-KEXX-Driver-Library-Package(...\FRDM-KEXX-Driver-Library-Package\ke_drv_lib\build\iar\ke06\PWT_demo)

PWT_Task PWT_demo.png

For more detail, please read "27.4.2 Edge detection and capture control" of MKE04P80M48SF0RM.

Best Regards,

Robin

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos