Post Go back to editing

Implement SPI in ADE9078 Evaluation Board.

Category: Software

Hello all,

I have Evaluation Board based on ADE9078 energy measurement IC. 

I am trying to implement SPI communication with Raspberry Pi.

Steps I have followed:

1. Provided power via DC jack 9V input.

2. Connected the PM0 and PM1 pins (near the crystal oscillator)  to the AGND pin to use normal mode .

3. Setup the wiring (MISO, MOSI, SCLK, CS) with Raspberry Pi.

4. Run the code to write (0x12AB) to PGA_GAIN (0x04B9). I have verified the command header is issued properly by the Raspberry Pi. 

Question 1 - When I have connected these pins to AGND, the IRQ1B LED is being lit constantly. Looking at the datasheet of evaluation board, I can't get any hint about this issue. Previously when the PM0 and PM1 were not connected to AGND, the LED was off.

Question 2 - How do I check if the ADE9078 is receiving the SPI command or not? 

Question 3 - Where should the SPI pins be connected to on the evaluation board? Is it via the connection points near the IC or via the SPI points on isolated P2?

I have tried by connecting to both of these options but both of them don't seem to work yet.

Since the MOSI, CLK and CSB signals are generated by the Raspberry Pi, they seem correct to me. But the MISO signal doesn't show what I expected. Below are the graphs: 

Fig 1: MOSI signal for writing into PGA_GAIN register.

Fig 2- MOSI signal to read from PGA_GAIN register.

Figure 3 - CLK, MOSI (Green) and MISO(Purple). MOSI has issued command to read but the MISO line shows no response to the command.

Edited typing errors.
[edited by: GauravBh at 6:51 AM (GMT -4) on 17 Aug 2023]
  • Use P2 on the isolated side 

    provide 5v to the Vbus and gnd test points on the left side 

    The IRQ1B is low on power up this is the reset_done indicator you can clear this by writing to status1 0xFFFFFFFF you really only need to write 1 to the reset done bit 16. 

    Your code should wait for this IRQ1 to go low to indicate the ADE9078 is ready to communicate. 

    The ADE9078 will get power from the vbus thru Iso power IC just put P1 in the correct position. You should have 3 LEDs when Vbus is applied. 

    CR1,CR8, CR9  I would set psm0 and 1 from the p2 connector as well. 


  • I succeeded with the power connection part. All mentioned lights are good. The IRQ1B also lights up which means the board is ready for communication. But the data is not written into STATUS1 register.


    Here, I am sending the command header in first two bytes. Address= Address of STATUS0 register = 0x402, R/W bit = 0

    Next 4 bytes are 0xFFFFFFFF. 

    But the IRQ1B LED doesn't turn off.  What am I doing wrong?

    Edit: I verified the CSB pin is LOW during this process.

  • Please verify you are Sending MSB first 

    this is my spi setup.

    SPI.setClockDivider(SPI_CLOCK_DIV16); // Slow speed (72 / 16 = 4.5 MHz SPI_1 speed)