Hello,
I am rather new to ARM microcontroller and despite the help on the ADC function and the messages in this forum, I find myself unable to run multiple acquisitions from my ADC.
I attached my project. I am working on FRDM Kinetis MKL05Z with CodeWarrior.
For one channel it is OK. For multiple channels I tried different solutions but without success.
Could someone give me some hints on what I am doing wrong?
Thanks in advance,
Oliver
Original Attachment has been moved to: Test_Project_V01.rar
Hi Olivier ,
1.The Cpu what you should select is MKL05Z32VFM4.
2.What do you mean in your ProcessorExpert.c // Method 2 for 2 channels defined separately - not working at all?
If you add
MyADCPtr = AD1_Init((LDD_TUserData *)NULL); | /* Initialize the device */ |
before for(;;) still will the PE_ISR(Cpu_Interrupt) happen?
3.the MeasuredValues[1] does not exist because your code below:
#define SAMPLE_GROUP_SIZE 1U
/* User includes (#include below this line is not maintained by Processor Expert) */
AD1_TResultData MeasuredValues[SAMPLE_GROUP_SIZE];
Best Regards
Robin
Hi Robin,
Many thanks for your help.
I created this test project to remove all the unwanted code, but I forgot to define the processor.
I have now 1 method that works fine for the acquisition of multiple channels.
I initially used the first method: "Method 1 for 1 single channel"
In the Component Inspector for AD1, I had "Static Sample Groups" disabled.
I tried to initialise SAMPLE_GROUP_SIZE to 4.
I thought I could acquire the signal from the 2 channels successively in one acquisition but this didn't worked.
I am a bit rusty in programming and I need to train seriously!
With my best regards,
Olivier