Post Go back to editing

ADE7880 DREADY

Category: Software
Product Number: ADE7880ACPZ-RL

Hi,

We have been using AD7800A for the energy measurement and monitoring. We have been facing a DREADY status will not working sometimes. After doing software and hardware reset will be fine and its working. Why this issues is coming and its a due to noise level in hardware or any software Initialization issues. We have checking dready bit every 0.1S. Check and let me know to solve the issues.

Below is my Initialization Code:

void ADE_Intz()

{

Error = ADE_Disable_RAM_Protect();
if(Error == CLR)
{
Error = ADE_Software_Reset();
if(Error == CLR)
{
Error = ADE_Write32(MASK0,0x00020020);HAL_Delay(50); //Enables interrupt for energy accumulation mode and DREADY eriodical (at 8 kHz rate) DSP computations finish
Error = ADE_Write32(MASK1,0x00080000);HAL_Delay(50); //Enables Sequence Check
Error = ADE_Write8(LCYCMODE,0xbd);HAL_Delay(50); //Enables power factor calculation, Phase A,b,C is selected for zero-crossings, VA-hour accumulation, watt-hour accumulation
Error = ADE_Write16(LINECYC,20);HAL_Delay(50); //Line cycle accumulation mode count
//ADE_Write16((CONFIG,0x0002);

Error = ADE_Write32(0x4381,0xFFFFFFFF);HAL_Delay(50);

Error = ADE_Write8(0xE7FE,0xAD);HAL_Delay(50); //Starting the DSP
Error = ADE_Write8(0xE7E2,0x14);HAL_Delay(50); //Starting the DSP

Error = ADE_Write8(0xE7FE,0xAD);HAL_Delay(50); //Starting the DSP
Error = ADE_Write8(0xE7E2,0x04);HAL_Delay(50); //Starting the DSP
Error = ADE_Write16(RUNREG,0x01);HAL_Delay(50); //Run register starts
Error = ADE_Enable_RAM_Protect();HAL_Delay(50);

}
}

}

void ADE_Data_Update(void)

{

ADE_Write32(STATUS1,status);HAL_Delay(1);
status = ADE_Read32(STATUS0);
if (status & 0x00020000) //dready
{
VR_RMS_RAW = ADE_Read32(AVRMS);NOP();
}

}

Thanks

  • Dready is divided down from the crystal if this bit stops working 

    1. Are you using SPI or I2C if I2C lock the comms to I2C

    2. What are the psm pins tied to ? Are any floating ? 

    3. what about reset pin. 

    4 . when status stops working what is the run register value. 

    5. do you have a 5Meg resistor across the crystal? figure 117 in the datasheet

    This is what you have 

    ADE_Write32(STATUS1,status);HAL_Delay(1);<< WHY this this is status1 not status0 
    status = ADE_Read32(STATUS0);
    if (status & 0x00020000) //dready
    {
    VR_RMS_RAW = ADE_Read32(AVRMS);NOP();
    }

    try this

     
    status = ADE_Read32(STATUS0);
    if (status & 0x00020000) //dready
    {

    ADE_Write32(STATUS0,status);   << do this 
    VR_RMS_RAW = ADE_Read32(AVRMS);NOP();
    }

    Dave

  • Hi,

    Thanks for the reply... Check out the comments below.

    Dready is divided down from the crystal if this bit stops working.

    1. Are you using SPI or I2C if I2C lock the comms to I2C --> I2C

    2. What are the psm pins tied to ? Are any floating ? --> PM0 Pulled High & PM1 Pulled Low

    3. what about reset pin. --> 10K & 1uF to High 3.3V.

    4 . when status stops working what is the run register value. --> This I will check it.

    5. do you have a 5Meg resistor across the crystal? figure 117 in the datasheet --> Yes

    Check out the below schematic.

    We tried the below code as you mentioned, but the problem is not solved.

    status = ADE_Read32(STATUS0);
    if (status & 0x00020000) //dready
    {

    ADE_Write32(STATUS0,status);   << do this 
    VR_RMS_RAW = ADE_Read32(AVRMS);NOP();
    }

    Check and let me know to solve the issues...

    Thanks.

  • Are you locking the coms to I2C    CONFIG2 bit 1

  • Hi,

    Is it there any chances of the crystal is causing the problem. We have been using the ABL-16.384MHZ-B2 (Power Level: 100uW , CL 18pf & ESR: 40 ohms). The datasheets recommends to use "the maximum drive level 1 mW; maximum ESR 20 Ω; load capacitance 12 pF".  Always this problems happens whenever the High Current 40A ABB Contactor turns ON & OFF. So we are doing the hardware & software reset through the MCU to get the ADE7880 to make it work.

    Kind Regards,

    Nishanth M