infineon4engi@twitter infineon@linkedin infineon4engineers infineon@youtube
twitter Facebook Linkedin Youtube

+ Reply to Thread
Results 1 to 1 of 1

Thread: ADC problem in CrossView Pro C166/ST10

  1. #1
    New Member New Member Nancy is on a distinguished road
    Join Date
    Jan 2017

    ADC problem in CrossView Pro C166/ST10

    Dear Sir/Madam,

    I use Tasking EDE C166-ST10 ver 8.8r1 and CrossView Pro C166/ST10 simulator to debug the code. I set PIN_ADC00 =3, PIN_VAREF= 5; PIN_VAGND=0; But the ADC result is always 0. And the ADC0_GLOBSTR.BUSY bit is always 0, ADC0_RCR0.VF bit is always 0. It seems that I cannot get the correct ADC value. Could you please help me to solve this problem?

    The following is the code design(also shown in the attached file):

    I used Infenion XC2365b to design ADC driver. Using Dave configuration; using ADC0, Parallel source, Permanent arbition; Configure ADC0 Channel 0, resultReg 0; enable Autoscan in Parallel source;

    The code is as follows:
    main ()



    // USER CODE BEGIN (Main,4)
    static uword ChannelNum;

    ChannelNum = (1<<ADC0_ANA_0)&0x0001;
    while((ADC0_uwBusy()==1 );
    raw_result = ADC0_uwGetResultData(RESULT_REG_0);

+ Reply to Thread

Tags for this Thread


All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.

Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.