FRDM-KE04Z  KDS  ADC_LDD sample code compile errors

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

FRDM-KE04Z  KDS  ADC_LDD sample code compile errors

898 Views
GeorgeChamberla
Contributor I

Hardware:-

FRDM-KE04Z PCB - with extra 10K Pot connected to the PKE04Z8VFK4 PTB2 pin. (Pot input +3V3 and GND)

Dev platform:-

Kinetis Design Studio and Processor Expert

Problem:-

ADC_LDD Component example code compile errors

 

Every second my Test program uses the ADC_LDD example code to read the ADC value of a Pot connected to PTB2 pin (J4 pin 1) and sets the intensity of the Red (RGB) Led PWM period accordingly.

 

I’m getting the following KDS compile errors.

'Building file: ../Sources/Events.c'

'Invoking: Cross ARM C Compiler'

 

../Sources/Events.c: In function 'TU2_OnCounterRestart':

../Sources/Events.c:195:46: error: 'LDD_ADC_Tsample' undeclared (first use in this function)

   Error = AD1_CreateSampleGroup(MyADCPtr, (LDD_ADC_Tsample *)SampleGroup, SAMPLE_GROUP_SIZE); // Set created sample group

   ^

../Sources/Events.c:195:63: error: expected expression before ')' token

   Error = AD1_CreateSampleGroup(MyADCPtr, (LDD_ADC_Tsample *)SampleGroup, SAMPLE_GROUP_SIZE); // Set created sample group

^

../Sources/Events.c:195:63: error: too few arguments to function 'AD1_CreateSampleGroup'

 

NB:-

I’m new to Freescale and Kinetis processors.

The ‘old’ CW ‘ADC_poll_demo’ example code runs OK on my FRDM-KE04Z PCB.


Original Attachment has been moved to: KE04Z-_ADC_Test_01.zip

Labels (1)
0 Kudos
1 Reply

506 Views
david_diaz
NXP Employee
NXP Employee

Hello George,

The following lines describes the errors presented in your code:

First of all, there were some typographical errors.

Picture1.jpg

Instead:

Picture2.jpg

Finally, it is necessary to generate code of the GetMeasurementCompleteStatus method in the component inspector from the ADC_LDD Component.

Picture3.jpg

Hope this information will be useful for you.

Have a great day.

Best Regards, :smileyhappy:

David Diaz.

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos