Post Go back to editing

aduc7039 上电需要外部复位,否则AD电压采样不正确

在使用ADUC7039过程中发现 系统断电重启后需要外部复位ADUC7039 否则采样电压采集不正确,

通过观察数据电压采集是正确值的2倍,查了手册没查出来是什么原因,通过软件复位也解决不了

//ADC0CON = 0x0001; // disable I-ADC, twos complement, gain=2
ADC1CON = 0x8200; // enable V-ADC & T-ADC, select V-ADC, uniplolar coding, internal Temp sensor
ADCFLT = 0x961f; // AF=0,SF=7,F_ADC=512KHz/(SF+1)/64=1KHz
ADCMSKI = 0x02; // enable all ADC interrupt
ADCMDE = 0x01; // ADC normal mode, continuous conversion

Parents Reply Children
  • In the process of using ADUC7039, it is found that the system needs external reset after power Down or restart, otherwise the sampling voltage acquisition is incorrect.

    By observing that the AD sampling voltage acquisition is twice the correct value, (For example, after resetting aduc7039, the AD sampling value is 3.1V, while the non-resetting AD sampling value is 6.2V)we checked the manual to find out what is the reason, and it can not be solved by software reset.

    I don't know if the parameter configuration is incorrect or if there are other configurations?

    while((PLLSTA&0x2)==0) {} // Ensure That thePLL is locked to the 3%
    // SysClock=20.48MHz/2=10.24MHz (POWCON:CD=1 by default)
    /* Timer2 setup ADuC7039 */
    T2CON = 0; // Disable watchdog timer

    /* Timer0 setup ADuC7039 */
    T0CON = 0x002A; // clock = SysClock/16384=625Hz, Count down, Periodic
    T0LD = 625; // 625Hz/625 = 1Hz


    /* ADC setup ADuC7036/39 */
    //ADC0CON = 0x0001; // disable I-ADC, twos complement, gain=2
    ADC1CON = 0x8200; // enable V-ADC & T-ADC, select V-ADC, uniplolar coding, internal Temp sensor
    ADCFLT = 0x961f; // AF=0,SF=7,F_ADC=512KHz/(SF+1)/64=1KHz
    ADCMSKI = 0x02; // enable all ADC interrupt
    ADCMDE = 0x01; // ADC normal mode, continuous conversion
    //ADC_VBAT_SetUp();

    /* GPIO setup ADuC7039 */
    GPCON = 0x00001111; // all GPIO configured as general purpose IO ÅäÖÃΪ SPI ¿Ú
    GPSET = 0x00000000; // GPSET=0 does not affect GPIO output level
    GPCLR = 0x00000000; // GPCLR=0 does not affect GPIO output level
    GPDAT = 0x34000000; // GPIO_2(MISO)/4/5 set as output, write 1; others GPIO_x£¨/SS, SCLK, MOSI£
    SPICON = 0x0341; // 0b41 0809 bit 0x8301

    /* IRQ/FIR setup */
    IRQ = Vector_IRQ;
    FIQ = Vector_FIQ;
    IRQEN = 0x00000200; // Enable SPI interrupt 0x20 SPI inti 0x4: Enable Timer0 int 0x00000004
    FIQEN = 0x00000100; // ADuC7039 only: Enable ADC int

  • Hello  Holger:

          my problem Can  be solved?

  • Hello  Holger:

             My question, is there any result?   What should I do next?

  • Hi Holger,Could you please give me a link of the underlying driver library of aduc7039, which I did not find on the official website, thank you!