Hi Linda,
Thank you for your interest in Freescale's kinetis product, I would like to provide service for you !
I think you are using this mode: One conversion of a created sample group, without interrupt service
The code in the help is really have problem.
I create a KE02 CW project based on the PE in CW with component ADC_LDD.
When I use the code from the help , I meet the same question with you.
So I check the ADC register, after I run this code:
Error = AD1_StartSingleMeasurement(MyADCPtr);
I find the ADC_SC1[COCO] already be 1, it means, the ADC already complete once converstion.
But when run
while (!AD1_GetMeasurementCompleteStatus(MyADCPtr));
The Status = DeviceDataPrv->CompleteStatus; in AD1_GetMeasurementCompleteStatus(MyADCPtr) function didn't get 1.
The problem is the real register of ADC didn't updated to DeviceDataPrv->CompleteStatus.
Then I modify the code in the main function to update the code to DeviceDataPrv->CompleteStatus and DeviceDataPrv->IntBuffer[Sample], the code will run OK, and the ADC result is correct.
My code in main function is as follows:

![]()
I also attached my project, you can refer to it.
Wish it helps you!
If you still have question, please contact me!
Regards,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. It would be nice!
-----------------------------------------------------------------------------------------------------------------------