ADE7880 Initialization procedure

Hello EngineeringZone experts,
I am working on ADE7880 metering IC and I have an initialization problem. I have followed the following procedure:

1- Pull RESET PIN  to high
2- Pull  PM0 PIN to high (for normal mode operation)
3- Pull PM1 to Zero
4- wait for 200 ms
5- Toggle SS pin 3 times (high to low transition) with 1 us toggling time to select SPI communication
6- Read checksum registers and other registers to verify the good communication between the MCU and ADE7880.

****************************************SPI timing*****************************************
- CLK speed is 100KHz (also i have tried lower and higher speeds)
- clock is generated after pulling the CS with 1usec.

*************************************Debugging methods **************************
1- Check volts of ADE ---------- good
2- SPI signals              ---------- good
3- SPI figure match the datasheet figures in page 79.
*************************************The result **************************
The registers contents doesn't match the default values. (actually, Always I got 7 or 3 or Zero values).

did i miss anything? please help.

best regards
Hossam 

    •  Analog Employees 
    on Aug 10, 2020 2:53 PM 2 months ago

    1- Pull RESET PIN  to high
    2- Pull  PM0 PIN to high (for normal mode operation)
    3- Pull PM1 to Zero

    Pull RESET PIN  to low

    Pull RESET PIN  to high
    4- wait for 200 ms
    5- Toggle SS pin 3 times (high to low transition) with 1 us toggling time to select SPI communication
    6- Read checksum registers and other registers to verify the good communication between the MCU and ADE7880.

    Dont forget to write 1 to to the run bit.

    Try reading compmode or cfmode registers

    Dave

    here is my startup

    //SET PSM 0
    digitalWrite(PM_0, HIGH); //set psm0 psm_0 = high psm_1=low
    digitalWrite(PM_1, LOW);


    //reset part
    digitalWrite(RESET_B, LOW);
    delay(10);
    digitalWrite(RESET_B, HIGH);

    delay(100); // your really want to wait for RSTDONE (IRQ1)

    while( digitalRead(IRQ1) == 1); //wait for reset done
    ADE7880_SPI_WRITE(STATUS1,0xffffffff,0x4);

    //set spi port TOGGLE SSB 3 TIMES
    digitalWrite(SSB_A, LOW);
    delay(1);
    digitalWrite(SSB_A, HIGH);
    delay(1);
    digitalWrite(SSB_A, LOW);
    delay(1);
    digitalWrite(SSB_A, HIGH);
    delay(1);
    digitalWrite(SSB_A, LOW);
    delay(1);
    digitalWrite(SSB_A, HIGH);

    Configure_register_in_ade7880();

    ADE7880_SPI_WRITE(Run, 0x0001, 2); //write run bit

  • Thanks Dave for your replay. I have followed the same procedure but the result is the same. BTW i have used the eval board for debugging issues but when i tried to capture the SPI signals, the signals from the EVAL board are weird

    . So i became very confused.

    •  Analog Employees 
    on Aug 10, 2020 4:21 PM 2 months ago in reply to Hosam Elfakher

    Something is wrong in your spi routine or your PCB. can you share your spi read write routines 

    A schematic might also be useful. Just noticed you are using the eval board how are you connect to the board ?

    Which header are you using? P11 you might have issues I use p17 with my Arduino. 

    Dave

    my settign for J17 I jumped 75 76 and 77 so all 3 pads are shorted. these pads connect spi lines and cf output to p17   p71,72,73,74 are needed to connect spi to jp17

  • Dave, I am using the analog GUI to watch the SPI signals on the EVAL board not using my MCU SPI. I am doing so to take these signals as a reference for debugging in my SW.

    •  Analog Employees 
    on Aug 10, 2020 4:42 PM 2 months ago in reply to Hosam Elfakher

    What you have show in the logic doesn't make sense then. Is the board working correctly? I would prefer to look at your code and the datasheet to figure the comms out. The eval software does a lot of unexpected  communication even for a simple read. Are you using arduino or something else?