Attachments are accessible only for community members.
Not applicable
Jul 30, 2014
06:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2014
06:43 AM
Hi All,
I am experiencing a problem with the ADC001 App where one of the 16 channels I am acquiring always returns the count of the previous channel. P14.8 is always the same as P14.9 in my case. I am using the XMC4500-F1--x1024 Stepping Code AB.
I have configured the ADC001 App to have 16 channels via 3 groups. See ADC001 App config and resource mappings (where the problem channels are in red and green)...
I have defined a 16 element array of structures to hold the 16 ADC channel results...
The 16 x ADC conversions are triggered every 1mS by the following function...
Each ADC conversion calls the following event function which copies the channel ADC count into the correct index in the result array...
The Group 1 Channel 1 is connected to P14.8 which has 3.3V on it so I would expect a count of 4095 but it is always the same as the Group 1 Channel 0 count which is connected to P14.9. See the 'A2DConversion' array indexes 9 & 8 below, both of which have counts of 186...
I believe the hardware to be fine as I have configured another project to acquire just one channel on pin P14.8 and I get the expected count of 4095 (3.3V).
I am wondering if anyone has come across this problem or if there could be a problem with the ADC001 App.
I would appreciate any help.
Thank you in advance
Best regards
Aaron
I am experiencing a problem with the ADC001 App where one of the 16 channels I am acquiring always returns the count of the previous channel. P14.8 is always the same as P14.9 in my case. I am using the XMC4500-F1--x1024 Stepping Code AB.
I have configured the ADC001 App to have 16 channels via 3 groups. See ADC001 App config and resource mappings (where the problem channels are in red and green)...
I have defined a 16 element array of structures to hold the 16 ADC channel results...
// Analogue Input variables in a structure
ADC001_ResultHandleType A2DConversion[ A2D_CHANNELS ]
=
{
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0},
{0,0,0}
}
;
The 16 x ADC conversions are triggered every 1mS by the following function...
void A2DTrigger(void)
{
if(A2DConversionEventChannel == 0)
{
// All channels converted so generate A2D Load Event (re-starts sequential multi-channel conversion)
A2DConversionEventChannel = A2D_CHANNELS; // Defined as 16
ADC001_GenerateLoadEvent(&ADC001_Handle0);
}
}
Each ADC conversion calls the following event function which copies the channel ADC count into the correct index in the result array...
void A2DConversionEvent(void)
{
A2DConversionEventChannel--; // Range following decrement = 15 to 0
// Read the A2D Result structure into 'A2DConversion' array
ADC001_GetResult(&ADC001_Handle0,&A2DConversion[A2DConversionEventChannel]);
}
The Group 1 Channel 1 is connected to P14.8 which has 3.3V on it so I would expect a count of 4095 but it is always the same as the Group 1 Channel 0 count which is connected to P14.9. See the 'A2DConversion' array indexes 9 & 8 below, both of which have counts of 186...
I believe the hardware to be fine as I have configured another project to acquire just one channel on pin P14.8 and I get the expected count of 4095 (3.3V).
I am wondering if anyone has come across this problem or if there could be a problem with the ADC001 App.
I would appreciate any help.
Thank you in advance
Best regards
Aaron
24 Replies
Attachments are accessible only for community members.
Not applicable
Jul 30, 2014
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2014
07:36 AM
Project attached which contains only the ADC001 and NVIC002 App's to demonstrate the problem on the XMC4500-F1--x1024 Stepping Code AB.
The problem is not present if the ADC001 App is configured for 2 groups of 8 but then I can't use P15.2 and P15.3 which reside in the 3rd ADC group in hardware.
Jul 30, 2014
09:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 30, 2014
09:43 AM
Aaron
I am wondering if your application is capable of reading pins P14.4, P14.5, P14.15 and P15.2. I asked on the forum if I can read these 4 ADC inputs somehow using ADC001 App. I will check your app and see if I can get the same results.
I am wondering if your application is capable of reading pins P14.4, P14.5, P14.15 and P15.2. I asked on the forum if I can read these 4 ADC inputs somehow using ADC001 App. I will check your app and see if I can get the same results.
Not applicable
Jul 31, 2014
12:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2014
12:02 AM
Hi jptalledo,
Thank you for your reply and your offer to help. I can read all P14 pins if I configure the ADC001 App with just 2 groups but when I have 3 groups (P15.2 and P15.3 added) then P14.8 returns the same A-D count as P14.9. Very strange.
Best regards
Aaron
Thank you for your reply and your offer to help. I can read all P14 pins if I configure the ADC001 App with just 2 groups but when I have 3 groups (P15.2 and P15.3 added) then P14.8 returns the same A-D count as P14.9. Very strange.
Best regards
Aaron
Not applicable
Jul 31, 2014
03:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2014
03:53 AM
Hi Aaron,
Why don't you try to read the conversion result directly from the global result register GLOBRES?
BR,
Zain
Why don't you try to read the conversion result directly from the global result register GLOBRES?
BR,
Zain
Not applicable
Jul 31, 2014
03:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2014
03:58 AM
HI Zain,
Thanks very much for the suggestion. I will try that.
I would still like to know if there is a problem with the ADC001 App, hopefully someone from Infineon can comment soon.
Very best regards
Aaron
Thanks very much for the suggestion. I will try that.
I would still like to know if there is a problem with the ADC001 App, hopefully someone from Infineon can comment soon.
Very best regards
Aaron
Not applicable
Jul 31, 2014
11:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jul 31, 2014
11:25 PM
Hi Aaron,
I have no problem for converting 16 channels from 3 groups using XMC4500 Relex Lite Kit-V1. P14.8 & P14.9 are connected to GND & 3.3V respectively. The rest channels are floating. VAREF is tied to 3.3V. Below are the results obtained:
As for the direct accessing of the GLOBRES, use "VADC -> GLOBRES". For example, GResult[count] = (VADC -> GLOBRES) & 0x1FFF.
Best regards,
Sophia
I have no problem for converting 16 channels from 3 groups using XMC4500 Relex Lite Kit-V1. P14.8 & P14.9 are connected to GND & 3.3V respectively. The rest channels are floating. VAREF is tied to 3.3V. Below are the results obtained:
As for the direct accessing of the GLOBRES, use "VADC -> GLOBRES". For example, GResult[count] = (VADC -> GLOBRES) & 0x1FFF.
Best regards,
Sophia
Not applicable
Aug 01, 2014
12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2014
12:06 AM
Hi Sophia,
Thank you for taking the time to test this. Could you attach a copy of your project please ?
Thank you very much
Aaron
Thank you for taking the time to test this. Could you attach a copy of your project please ?
Thank you very much
Aaron
Attachments are accessible only for community members.
Not applicable
Aug 01, 2014
01:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2014
01:31 AM
Not applicable
Aug 01, 2014
01:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2014
01:32 AM
Thank you very much Sophia.
Best regards
Aaron
Best regards
Aaron
Aug 01, 2014
05:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 01, 2014
05:01 PM
Sophia.
Is it possible to instead of reading 16 channels, I can read the following Analog Pins: P14.4 P14.5 P14.15 and P5.2? Two of them are in the same group P14.15 and P5.2. Wondering a way to get the reading from all these 4 channels using a fixed setup.
Is it possible to instead of reading 16 channels, I can read the following Analog Pins: P14.4 P14.5 P14.15 and P5.2? Two of them are in the same group P14.15 and P5.2. Wondering a way to get the reading from all these 4 channels using a fixed setup.
Not applicable
Aug 03, 2014
10:35 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 03, 2014
10:35 PM
Hi Jean Paul,
ADC002 should be used for your case. I think there is a typo: P5.2 should be P15.2, isn't it?
BR,
Zain
ADC002 should be used for your case. I think there is a typo: P5.2 should be P15.2, isn't it?
BR,
Zain
Not applicable
Aug 04, 2014
02:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 04, 2014
02:34 AM
Hi Sophia,
I am still struggling with this one. If I run your project all is OK. If I paste your main.c into my project it doesn't work even though I have configured the ADC001 to be the same as your project.
The main difference I can see between your project and my project is the Resource Mapping and Signal Assignment but I have no control over this as DAVE maps them. The other thing I have noticed is that DAVE is not consistent in the way it maps the ADC001 channels to the IO001 Apps.
I have not been able to force the Resource Mapping and Signal Assigment in my project to be the same as yours.
If you run the project attached in post #2 I hope you will see the same problem.
Thank you once again
Best regards
Aaron
I am still struggling with this one. If I run your project all is OK. If I paste your main.c into my project it doesn't work even though I have configured the ADC001 to be the same as your project.
The main difference I can see between your project and my project is the Resource Mapping and Signal Assignment but I have no control over this as DAVE maps them. The other thing I have noticed is that DAVE is not consistent in the way it maps the ADC001 channels to the IO001 Apps.
I have not been able to force the Resource Mapping and Signal Assigment in my project to be the same as yours.
If you run the project attached in post #2 I hope you will see the same problem.
Thank you once again
Best regards
Aaron
Not applicable
Aug 05, 2014
12:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2014
12:06 AM
Hi Aaron,
Is this project originally built in DAVE 3.1.6 or 3.1.8 then migrated to 3.1.10? Are you able to build a working new project in a new workspace (DAVE 3.1.10) according to may settings?
Best regards,
Sophia
Is this project originally built in DAVE 3.1.6 or 3.1.8 then migrated to 3.1.10? Are you able to build a working new project in a new workspace (DAVE 3.1.10) according to may settings?
Best regards,
Sophia
Not applicable
Aug 05, 2014
12:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2014
12:10 AM
Hi Sophia,
It was created completely in DAVE 3.1.10. Did you try running it ?
Thanks
Aaron
It was created completely in DAVE 3.1.10. Did you try running it ?
Thanks
Aaron
Not applicable
Aug 05, 2014
12:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2014
12:22 AM
Hi Aaron,
But I there are "Old_Lib" & "Old_Startup" folders in your project folder. Where are they come from? If it is newly built project in new workspace using DAVE 3.1.10. Then send us your log files including solver log file.
Best regards,
Sophia
But I there are "Old_Lib" & "Old_Startup" folders in your project folder. Where are they come from? If it is newly built project in new workspace using DAVE 3.1.10. Then send us your log files including solver log file.
Best regards,
Sophia
Not applicable
Aug 05, 2014
04:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 05, 2014
04:26 AM
Hi Sophia,
OK I will create a new test project in DAVE 3.1.10 and see if it works BUT the real project I am working on was migrated from DAVE 3.1.6. The project is very big so I will not be able to start it all over again in DAVE 3.1.10. The best I could do is delete the ADC001 App and it's children and the insert the ADC001 App and configure it again.
It would still be useful to know if you ran my project and witnessed the problem or not.
I will report back in a few days.
Thank you very much
Best regards
Aaron
OK I will create a new test project in DAVE 3.1.10 and see if it works BUT the real project I am working on was migrated from DAVE 3.1.6. The project is very big so I will not be able to start it all over again in DAVE 3.1.10. The best I could do is delete the ADC001 App and it's children and the insert the ADC001 App and configure it again.
It would still be useful to know if you ran my project and witnessed the problem or not.
I will report back in a few days.
Thank you very much
Best regards
Aaron
Not applicable
Aug 08, 2014
04:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2014
04:12 AM
Hi Sophia,
I have created a new project with DAVE 3.1.10 (attached) and it does not work, please note the following...
1) My project uses "main.c" from your project.
2) My ADC001 and NVIC002 Apps have been configured in the same way as your project.
3) The difference I see between the 2 projects is the Resource Mapping which I have no control over. For example...
Your project
P14.8 -> IO001/8 -> Channel BD -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BE -> vadc/0/group/1/ch/1
My project
P14.8 -> IO001/8 -> Channel BF -> vadc/0/group/1/ch/1
P14.9 -> IO001/9 -> Channel BA -> vadc/0/group/1/ch/0
The channels are swapped
4) Running your project in my hardware I get the following...
Group 1, channel 0 (P14.8) = 4095
Group 1, channel 1 (P14.9) = 186
5) Running my project in my hardware I get the following...
Group 1, channel 0 (P14.9) = 188
Group 1, channel 1 (P14.8) = 187
6) Screen shot from your project
7) Screen shot from my project
😎 All other channel results match between your project and mine
I am struggling to see where the problem lies. Your help would be greatly appreciated.
Best regards
Aaron
I have created a new project with DAVE 3.1.10 (attached) and it does not work, please note the following...
1) My project uses "main.c" from your project.
2) My ADC001 and NVIC002 Apps have been configured in the same way as your project.
3) The difference I see between the 2 projects is the Resource Mapping which I have no control over. For example...
Your project
P14.8 -> IO001/8 -> Channel BD -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BE -> vadc/0/group/1/ch/1
My project
P14.8 -> IO001/8 -> Channel BF -> vadc/0/group/1/ch/1
P14.9 -> IO001/9 -> Channel BA -> vadc/0/group/1/ch/0
The channels are swapped
4) Running your project in my hardware I get the following...
Group 1, channel 0 (P14.8) = 4095
Group 1, channel 1 (P14.9) = 186
5) Running my project in my hardware I get the following...
Group 1, channel 0 (P14.9) = 188
Group 1, channel 1 (P14.8) = 187
6) Screen shot from your project
7) Screen shot from my project
😎 All other channel results match between your project and mine
I am struggling to see where the problem lies. Your help would be greatly appreciated.
Best regards
Aaron
Attachments are accessible only for community members.
Not applicable
Aug 11, 2014
12:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 11, 2014
12:26 AM
Not applicable
Aug 11, 2014
12:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 11, 2014
12:54 AM
Hi Aaron,
Pls upload the log files including_solver.log as well.
Best regards,
Sophia
Pls upload the log files including
Best regards,
Sophia
Attachments are accessible only for community members.
Not applicable
Aug 11, 2014
03:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 11, 2014
03:14 AM
Not applicable
Aug 11, 2014
10:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 11, 2014
10:19 PM
Hi Aaron,
Sure.
In the meantime, I would like to seek your understanding of a small delay as our developers are busy on the next major release. I will follow up with the progress.
Best regards,
Sophia
Sure.
In the meantime, I would like to seek your understanding of a small delay as our developers are busy on the next major release. I will follow up with the progress.
Best regards,
Sophia
Not applicable
Sep 09, 2014
07:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 09, 2014
07:36 AM
Hi Sophia,
Any news on this please ?
Thank you very much
Best regards
Aaron
Any news on this please ?
Thank you very much
Best regards
Aaron
Not applicable
Sep 11, 2014
12:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sep 11, 2014
12:33 AM
Hi Sophia,
Good news ! After updating my DAVE libraries to the latest versions the problem is resolved.
Thank you for your time and help.
Best regards
Aaron
Good news ! After updating my DAVE libraries to the latest versions the problem is resolved.
Thank you for your time and help.
Best regards
Aaron
Not applicable
Apr 23, 2015
01:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 23, 2015
01:58 AM
Hi Sophia,
A colleague experienced the same problem this week and it looks like the root cause is a DAVE bug.
For all A-D channels to work, both the input pin number and the A-D channel must be SEQUENTIAL.
DAVE can incorrectly allocate the resources so the pins and channels are not sequential and the solver does not report an error.
For example,
If DAVE allocates the resource shown below the A-D works OK
P14.8 -> IO001/8 -> Channel BD -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BE -> vadc/0/group/1/ch/1
If DAVE allocates the resource shown below the A-D does not work because channels 0 and 1 are swapped relative to the pin numbers (not sequential)
P14.8 -> IO001/8 -> Channel BF -> vadc/0/group/1/ch/1
P14.9 -> IO001/9 -> Channel BA -> vadc/0/group/1/ch/0
If we use the Manual Resource Assignment to force the pins and channels to be sequential as shown below the A-D works OK.
P14.8 -> IO001/8 -> Channel BA -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BF -> vadc/0/group/1/ch/1
Please can you ensure this is fixed in the new DAVE 4.
Thank you very much
Best regards
Aaron
A colleague experienced the same problem this week and it looks like the root cause is a DAVE bug.
For all A-D channels to work, both the input pin number and the A-D channel must be SEQUENTIAL.
DAVE can incorrectly allocate the resources so the pins and channels are not sequential and the solver does not report an error.
For example,
If DAVE allocates the resource shown below the A-D works OK
P14.8 -> IO001/8 -> Channel BD -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BE -> vadc/0/group/1/ch/1
If DAVE allocates the resource shown below the A-D does not work because channels 0 and 1 are swapped relative to the pin numbers (not sequential)
P14.8 -> IO001/8 -> Channel BF -> vadc/0/group/1/ch/1
P14.9 -> IO001/9 -> Channel BA -> vadc/0/group/1/ch/0
If we use the Manual Resource Assignment to force the pins and channels to be sequential as shown below the A-D works OK.
P14.8 -> IO001/8 -> Channel BA -> vadc/0/group/1/ch/0
P14.9 -> IO001/9 -> Channel BF -> vadc/0/group/1/ch/1
Please can you ensure this is fixed in the new DAVE 4.
Thank you very much
Best regards
Aaron