LPC54S018 Frequency measurement of external GPIO not working

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

LPC54S018 Frequency measurement of external GPIO not working

216 Views
Yoann
Contributor I

Hello,

I'm working with a LPC54S018-EVK board, and I want to use the frequency measurement function to measure the frequency of a external input clock.

I am using the SDK example working with the FMEAS driver and it is working well to measure the internal clocks target.

In the 'pins tool' I have routed the pin D4 to SYSCON FREQME functionnality and in the code I launch the example with "kINPUTMUX_FreqmeGpioClk_a" as target clockand I let the main clock as clock reference, but it doesn't work, the measure never complete.

I can't see what I miss or did wrong, any idea ?

Thx

Yoann

0 Kudos
2 Replies

191 Views
Yoann
Contributor I

Ok for me,

The target clock was not running and that's why it didn't complete what is a bit disturbing because the reference clock is running I expected to get 0 as result.

Fortunately I see this comment on the online API :

/* Start a measurement cycle and wait for it to complete. If the target
clock is not running, the measurement cycle will remain active
forever, so a timeout may be necessary if the target clock can stop. */
 
Unfortunately it is not mentionned neither in the user manual neither in the SDK documentation.
 
Yoann
0 Kudos

170 Views
Alex_Wang
NXP Employee
NXP Employee

Hi, @Yoann 

         Thank you for your sharing. I will feedback your opinions to the document team.

Best regards, Alex

0 Kudos