AnsweredAssumed Answered

ADE9000 SPI Connection Problems

Question asked by LionwoIf777 on Oct 19, 2017
Latest reply on Oct 31, 2017 by Gary.Kang.AnalogDevices

Part: ADE9000

Dev Board: ADE9000 Eval board - 08-039712 rev. C

 

Problem: When i try to read from the ADE9000 via SPI, I always receive 0xFFFFFFFF as the response.

 

I have a pic32MZ2048efh100 chip on its dev board connected to the ADE9000 dev board.

Connections (Pic32 - ADE9000):

  • 3.3V to Dev board VDD (with pins 1&2 jumpered on the power supply selector)
  • Gnd-Gnd
  • 3.3V - Reset
  • pin out - PM0
  • pin out - PM1
  • pin out - SS
  • SCLK - SCLK
  • SDO1 - MOSI
  • SDI1 - MISO

 

Pic32 SPI Settings:

  • Master mode
  • Non Framed
  • 10MHz (PBCLK2 divided down)
  • 16bit mode (also tried 32)
  • Enhanced Buffer enabled
  • SPI Data Input Sample Phase - Input data sampled at end of data output time. (SMP=1)
  • SPI Clock Edge Select - Serial output data changes on transition from active clock state to idle clock state (CKE=1)
  • Clock Polarity Select - Idle state for clock is a high level (CKP=1)

 

Booting:

After the Pic is ready it brings both the PM0 and PM1 pin low.

The ADE9000 dev boards IRQ1B LED turns on shortly after.

 

Test Case:

For my test case i have been trying to write a value to DICOEFF (address: 0x072) and read it back afterwards.

 

Method For Writing:

SS pin out from Pic32 to ADED9000 SS is brought low.

I have a 16bit unsigned int used to build the command.

I load the address 0x072 into it, bit shift it left 4 bits (<<=4). The result its [address-12bits][write 1 zero bit][3 zero bits].

This value is loaded into the Pic32s FIFO SPI buffer.

A 32 bit unsigned int containing the value to be written is then loaded into the Pic32s FIFO SPI buffer.

Then the PIC32s buffer is read from (pulls the response from when the address was sent). 

Then it is read from again (pulls the response from when the value to be set was sent).

SS pin oout from Pic32 to ADE900 SS is brought high.

 

Method for reading:

This is the same as writing except that i pass out and store the retreived value.

 

Results:

In both of these cases, whether reading or writing, regardless of address command or value, the result is that i always recieve back 0xFFFF (in 16bit mode) or 0xFFFFFFFF (when testing in 32 bit mode).

 

My values are going into the buffer correctly, and the received buffer gets the expected number of responses in it, but always Fs. 

 

Any guidance or direction would be appreciated.

Outcomes