Hi, Wallace,
Regarding your question, unfortunately, I have not the example code. But you can follow up as the procedure:
1)configure ADC converter and use hardware triggering mode by setting the ADCx_SC2[ADTRG]
2)configure the PIT so that the sampling frequency is for example fs=256*FREQsignal. Configure the SIM_SOPT7 register, in detail, set ADC0ALTTRGEN bit, clear ADC0PRETRGSEL assuming that you use ADC0_SA to save sample, select ADC0TRGSEL as 0100 to select PIT0 as triggering source.
3)use polling or interrupt mode to get 256 samples, which are within ONE signal cycle
4)Regarding the question how to call FFT, pls refer to the case:
https://community.nxp.com/thread/325915
5)Because you use ONE cycle of the signal, the Bin 1 is the fundamental component, the Bin 2,3,4...9 are the harmonic components.
Hope it can help you
BR
XiangJun Rong