PDA

View Full Version : ADC001 App only converts 8 channels when configured to convert 9 channels



Aaron Walsh
Jun 28th, 2013, 06:49 AM
I have configured the ADC001 App to acquire 9 analogue channels (8 channels in Group A and 1 channel in Group B) with NVIC002 configured to generate an interrupt on each conversion event.

However only 8 analogue values are generated before the ADC001 loops round to the first channel again. I was also expecting Group B to equate to Group Number 1 rather than 3. The order of groups and channels as they occur in my interrupt handler are...


Group Channel Counter
----- ------- -------
3 3 8 ! Was expecting Group 1 Channel 0 here
0 7 7
0 6 6
0 5 5
0 4 4
0 3 3
0 2 2
0 1 1
3 3 0 ! Was expecting Group 0 Channel 0 here (9th analogue value)

0 7 8
0 6 7
etc

I also tried configuring the project for 10 channels but then only 9 channels were acquired, still no Group 0, Channel 0 (the last channel).

The project is configured to run on the Infineon Hex kit for xmc4500 with stepping code AA and can be downloaded from...

https://dl.dropboxusercontent.com/u/1159506/Aaron/ADC001_9_CHANNELS.zip

Any help or workaround would be greatly appreciated

Aaron

sophia
Jul 1st, 2013, 12:20 AM
Hi Aaron,

Unfortunately I am unable to download your code. However, I have no problem to get the conversion results with correct sequence. Attached is for your reference.

208
209

Best regards,
Sophia

Aaron Walsh
Jul 1st, 2013, 02:37 AM
Hi Sophia,

Thank you for your very fast reply.

I ran your ADC001_XMC4500_AA project and got the same 'Result' array in the Variables tab. However the potentiometer on the Hexagon kit did not change any of the 'Result' values.

I then checked the 'Manual Pin Assignment' dialog and found the 8 x 'IO001' Apps were not connected to any pins, so I fixed this.

The 'Result' array was updated once only so I tried to check the 'ADC001' App 'Autoscan Mode' option but the check box always remained clear. I cannot explain this because I have been able to check this option in the past.

So I added the 'ADC001_GenerateLoadEvent(&ADC001_Handle0);' function call to the 'GlobalResultEvent' function when 'count>8'. The 'Result' array now updates continuously.

This all works well so I will re-visit my code.

Interestingly your ADC001_XMC4500_AA project 'Result' array shows Group Numbers 2 and 3 whereas my ADC001_XMC4500_AA project 'Result' array shows Group Numbers 0 and 3.

213

I will keep you informed if I find further problems.

Thanks again to you and ZhengL
Best regards
Aaron