Post Go back to editing

The Power Quality Library Software and CRC

Category: Software
Product Number: Power Quality library
Software Version: 1.2.0

I am running Version 1.2.0 of the Power Quality Library on the EVAL-ADE9430 Board.  I could be wrong but it appears the code in the Power Quality Library is defaulting to  disabling CRC verification.  The code that initializes the SPI Bus is in the file afe_config.c.

The MXSPIInit(void) function is setting the  " hSPI.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;" 

When I enable CRC (" hSPI.Init.CRCCalculation = SPI_CRCCALCULATION_ENABLE;") I am seeing errors when I try to do simple register reads via the console. 

The Terminal Output is shown in the table  below with CRC ENABLED on the left and CRC DISABLED on the right.

You can see when CRC is enabled (left) it has trouble reading ADE9430 registers. 

I want to make sure I am not doing something wrong here. The only thing I did was enable CRC to start seeing these failures. 

Thanks - mike

Parents
  • Assuming that this SPI_CRCCALCULATION_DISABLE is meant to remain unchanged (presumably compatibility issues with the STM32) and the example software doesn't seem to be reading the trailing 16 bits for the chips appended CRC - does this mean that we would need to add extra code (manual CRC calcs) if we wanted to do proper validation on the receive side?

Reply
  • Assuming that this SPI_CRCCALCULATION_DISABLE is meant to remain unchanged (presumably compatibility issues with the STM32) and the example software doesn't seem to be reading the trailing 16 bits for the chips appended CRC - does this mean that we would need to add extra code (manual CRC calcs) if we wanted to do proper validation on the receive side?

Children
No Data

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.