Aducm3029: Enable low power mode for the reference buffer by setting the RBUFLP bit in Register ADC_CFG1

Hi there,

I want to keep MCU in Flexi mode while using ADC module for power optimization. 

Please let me know how do I set RBUFLP bit in Register ADC_CFG1 in Aducm3029(EVCOG3029LZ board)?

I couldn't find any API for it in the driver. Also, I am unable to set it manually. 

Thanks,

Gopal 

  • Also Please let me know how to set the CNVDONE bit to 1 in the ADC interrupt enable register (Register ADC_IRQ_EN) to enable the interrupt function when the conversion is complete.

  • Hello ,

    • To set RBUFLP, just add this line before enabling the ADC.
      *pREG_ADC0_CFG1 = BITM_ADC_CFG1_RBUFLP << BITP_ADC_CFG1_RBUFLP;

    • The CNVDONE bit in ADC_IRQ_EN is already set in the function adi_adc_Open();

    Regards,

    Jhake

  • Hello ,

    Thank you very much. That worked successfully.

    Now My processor is consuming 1.06mA in flexi mode. 

    I have one question though.

    As per reference manual, We can wake up the controller from the flexi mode ("exception 62"). 

    1. I am still confused that this "exception 62" is to wake up the controller( from flexi to active mode in our case) when there is some analog input data at ADC0 pin? Please correct me if I am wrong. If yes, Can you help me with a sample code or guide me? (I cant keep threshold comparator here since I need to keep processor in low power consumption mode)

    2. I am trying to wake up the controller with let's say function generator Sine wave with 3 Vpp with 200mSec cycle. So how much starting portion of signal I may lose(10% or more?). Actually my task is to wake up the controller with Analog excitation and write digital values in the file for further analysis. Rest of the time controller will be in sleep/flexi mode for low power consumption.

    Please let me know. Waiting for your reply.

    Thanks,

    Gopal Vishwakarma

  • Hi ,

    You may use the adi_adc_SetHighLimit and adi_adc_EnableDigitalComparator while still consuming low power. Just make sure to enable only the ALERT in the pREG_ADC0_IRQ_EN register.

    // Enable only the ALERT interrupt
    *pREG_ADC0_IRQ_EN = 0x1000;
    
    // Configure the comparator
    adi_adc_SetHighLimit(hDevice, ADI_ADC_CHANNEL_0, true, 1024);
    adi_adc_EnableDigitalComparator(hDevice, true);
    
    // Enter Flexi mode
    adi_pwr_EnterLowPowerMode(ADI_PWR_MODE_FLEXI, NULL, 0);

    Regards

  • Thanks .  Your answer helped.

    Now it is consuming 0.7mA in flexi mode.

    Let me read now adc signal and store in file.

    Best,

    Gopal