0
\$\begingroup\$

I'm trying to change the microcontroller that comes with the ADE7878 evaluation board by the STM32F429i. The documentation from Analog Devices shows how to do this using SPI. I'm trying it but I'm getting no response from ADE7878. I put some images to ilustrate the question:

enter image description here

SCLk Signal in channel 1 and MOSI in channel 2

SS signal in channel 1 and MISO in channel 2

And finally the problem:

SCLK signal in channel 1 and MISO in channel 2

As one can see, the MISO is oscillating in phase with clock but seams to be just a noise and everyting it sends is 0xFF.

I am configuring SPI with this parameters:

SpiHandle.Instance               = SPIx;
SpiHandle.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_128;
SpiHandle.Init.Direction         = SPI_DIRECTION_2LINES;
SpiHandle.Init.CLKPhase          = SPI_PHASE_2EDGE;
SpiHandle.Init.CLKPolarity       = SPI_POLARITY_HIGH;
SpiHandle.Init.CRCCalculation    = SPI_CRCCALCULATION_DISABLE;
SpiHandle.Init.CRCPolynomial     = 7;
SpiHandle.Init.DataSize          = SPI_DATASIZE_8BIT;
SpiHandle.Init.FirstBit          = SPI_FIRSTBIT_MSB;
SpiHandle.Init.NSS               = SPI_NSS_SOFT;
SpiHandle.Init.TIMode            = SPI_TIMODE_DISABLE;

The clock of the STM32F429i is 180MHz.

I tested this STM32F429i SPI communication with another STM32F4 board and it was correct, with no problem, using this same configuration.

Please any question, any doubt let me know. It will be a pleasure to help you to help me... :)

Thanks!

\$\endgroup\$
  • \$\begingroup\$ The "noise" you see is probably due to the fast edges of the STM32 in combination with your probe setup. I notice you use SPI_NSS_SOFT in your init struct. This means the SPI chip select should be set by software, and is not set by hardware. Did you code and check the chip-select pin during SPI transfers? \$\endgroup\$ – Hans Oct 7 '15 at 18:44
  • \$\begingroup\$ @Hans I'm using an IO as Slave Select. See the edition with the SS signal. Thanks! \$\endgroup\$ – Leandro Lima Oct 7 '15 at 18:59
  • \$\begingroup\$ Is there any chance that the STM32F429 has burned the MISO output of ADE7878?? For example, draining more current than it could deliver? \$\endgroup\$ – Leandro Lima Oct 8 '15 at 13:38
1
\$\begingroup\$

I have found that a digital isolator was burned. Exactly that one that sends the clock signal to the ADE7878.

\$\endgroup\$
0
\$\begingroup\$

https://developer.mbed.org/platforms/ST-Nucleo-F429ZI/

If you use Ethernet and not SPI Keep your board with the default configuration. If you use SPI and not Ethernet You should remove JP6 jumper on the front side of the board. If you use both SPI and Ethernet You have to patch the NUCLEO board on the back side: remove SB121 and close SB122 solder bridges. This will connect PB_5 to D11 instead of PA_7.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.