Not applicable
May 04, 2015
11:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 04, 2015
11:49 PM
Hi,
when trying to set up the AD-Converter with Dave (I am not using the Apps) I am facing some problems. I cant get any results from the converter even if I follow the instructions from the reference manual and the application note for the ADC. I am using a XMC4500 relax kit. Here is my initialisation sequence:
SCU_RESET -> PRSET0 |= (1 << SCU_RESET_PRSET0_VADCRS_Pos); //apply reset
SCU_RESET -> PRCLR0 |= (1 << SCU_RESET_PRCLR0_VADCRS_Pos); //release reset
VADC -> GLOBCFG |= (1 << VADC_GLOBCFG_DIVWC_Pos); //write acces for clk division
VADC -> CLC &=~(1 << VADC_CLC_DISR_Pos); //enable clk
VADC -> BRSSEL[0] |= (1 << VADC_BRSSEL_CHSELG0_Pos); //Background request source for channel 0
VADC -> BRSMR |= (0b01 << VADC_BRSMR_ENGT_Pos); //configure gating
VADC_G0 -> ARBPR|= (1 << VADC_G_ARBPR_ASEN0_Pos);
VADC_G0 -> ARBCFG |= (0b11 << VADC_G_ARBCFG_ANONC_Pos); //enable ADC
VADC -> BRSMR |= (1 << VADC_BRSMR_LDEV_Pos); //generate load event
First of all it is not possible to write in the GLOBCFG register. When debugging and using breakpoints, the write control bit can not be set. The write control is always disabled. If I dont apply the reset all registers related to the ADC contain the value 0xffffffff. How comes that? There doesn't occure any value in the result register.
I applied a poti at P14.0 to change the measured value.
Any suggestions?
Thank you for your help,
XMC_Beginner
when trying to set up the AD-Converter with Dave (I am not using the Apps) I am facing some problems. I cant get any results from the converter even if I follow the instructions from the reference manual and the application note for the ADC. I am using a XMC4500 relax kit. Here is my initialisation sequence:
SCU_RESET -> PRSET0 |= (1 << SCU_RESET_PRSET0_VADCRS_Pos); //apply reset
SCU_RESET -> PRCLR0 |= (1 << SCU_RESET_PRCLR0_VADCRS_Pos); //release reset
VADC -> GLOBCFG |= (1 << VADC_GLOBCFG_DIVWC_Pos); //write acces for clk division
VADC -> CLC &=~(1 << VADC_CLC_DISR_Pos); //enable clk
VADC -> BRSSEL[0] |= (1 << VADC_BRSSEL_CHSELG0_Pos); //Background request source for channel 0
VADC -> BRSMR |= (0b01 << VADC_BRSMR_ENGT_Pos); //configure gating
VADC_G0 -> ARBPR|= (1 << VADC_G_ARBPR_ASEN0_Pos);
VADC_G0 -> ARBCFG |= (0b11 << VADC_G_ARBCFG_ANONC_Pos); //enable ADC
VADC -> BRSMR |= (1 << VADC_BRSMR_LDEV_Pos); //generate load event
First of all it is not possible to write in the GLOBCFG register. When debugging and using breakpoints, the write control bit can not be set. The write control is always disabled. If I dont apply the reset all registers related to the ADC contain the value 0xffffffff. How comes that? There doesn't occure any value in the result register.
I applied a poti at P14.0 to change the measured value.
Any suggestions?
Thank you for your help,
XMC_Beginner
- Tags:
- IFX
4 Replies
May 05, 2015
10:16 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 05, 2015
10:16 PM
Hi,
There are many DAVE3 VADC examples from this link.
http://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html
Beside this you can also refer to this..
http://www.infineonforums.com/threads/1812-XMC_HOT-XMC4500-How-to-do-ADC-Queue-source-conversion
Best Regards
Travis
There are many DAVE3 VADC examples from this link.
http://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html
Beside this you can also refer to this..
http://www.infineonforums.com/threads/1812-XMC_HOT-XMC4500-How-to-do-ADC-Queue-source-conversion
Best Regards
Travis
Apr 02, 2020
08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 02, 2020
08:04 AM
I am running into the exact same issue. Looking at DAVE examples is not helping.
Does anyone know why all of the values for the VADC registers might default to 0xFFFFFFFF instead of the values given in the datasheet? (The same holds true for the USIC registers).
I am also trying to setup not using Dave Apps (I'm actually using Keil as the compiler, but using DAVE also shows these memory locations defaulting to 0xFFFFFFFF.).
I have attached a screenshot showing the registers as all F's, and a bit of the code.
Thanks
Does anyone know why all of the values for the VADC registers might default to 0xFFFFFFFF instead of the values given in the datasheet? (The same holds true for the USIC registers).
I am also trying to setup not using Dave Apps (I'm actually using Keil as the compiler, but using DAVE also shows these memory locations defaulting to 0xFFFFFFFF.).
I have attached a screenshot showing the registers as all F's, and a bit of the code.
Thanks
Apr 02, 2020
02:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 02, 2020
02:06 PM
The issue was buried deep in the bloated DaveApp code; I did not see any mention of it in the user manual.
The Peripheral CLK must be ungated, and the VADC periph must then be manually reset in SW. See below for the two lines that make it work (136/137).
The Peripheral CLK must be ungated, and the VADC periph must then be manually reset in SW. See below for the two lines that make it work (136/137).
Apr 03, 2020
02:00 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 03, 2020
02:00 AM
The issue was buried deep in the bloated DaveApp code; I did not see any mention of it in the user manual.=> DAVE code abstraction layer.
To get to know better the ADC these documents might be helpful:
https://www.infineon.com/dgdl/Infineon-VADC-XMC4000-AP32305-AN-v01_02-EN.pdf?fileId=5546d4624e765da5...
https://www.infineon.com/dgdl/Infineon-VADC-XMC1200_XMC1300-AP32304-AN-v01_10-EN.pdf?fileId=5546d462...
Regards,
Jesus