This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28062F: PSA CRC Calculation

Part Number: TMS320F28062F
Other Parts Discussed in Thread: TMS320F28027F

Hi E2E,

I have followed the instructions in the Safe-TI library documentation to implement the IEC-60730 safety checks including a CRC of the flash sectors. I would like to be able to extract my flash data from my .hex output, calculate the flash sector CRCs and append the .hex file with the CRCs in a post-build script. This will greatly improve my build process since I won't have to build once, connect to the debugger and dump CRCs and build again.

I am familiar and comfortable with calculating various CRC protocols but can't seem to figure out this 40-bit CRC protocol that the parallel serial analyzer (PSA) uses. I was curious if any additional documentation existed regarding the PSA? The only shred of documentation I can find on it is a single page in the "IEC60730_F280xx_STL_User_manual.pdf" which only specifies the polynomial.

I primarily use a TMS320F28062F and a TMS320F28027F for what it's worth.

Regards,

Noah Erickson

  • The polynomial for the PSA is not release. Also, it only performs a signature on the the program bus. Therefore, only the program execution would have the PSA calculation on it. It cannot be used to calculate a signature on a chunk of data. Also it calculates the signature on a cycle by cycle basis. Therefore, you will need to identify a different solution.

    sal
  • Hi Sal,

    Thanks for the reply but I would like a bit more clarification before identifying a different solution. On page 90 of the "IEC60730_F2806x_STL_User_Manual.pdf", section A.1 starts by saying "Parallel Serial Analyzer (PSA) is a module in c28x devices that can be used to generate a 40 bit CRC on a given memory region. The PSA polynomial is Y = x^40+x^21+x^19+x^2+1. The PSA calculates CRC values by monitoring Data Read Data Bus."

    This user manual suggests that the PSA polynomial is released, is used to calculate a signature on a chunk of data and performs it on the data bus, not program bus.

    Is this user manual incorrect?
  • Hi Noah,

    You are correct the PSA calculates both on read bus and data bus. And that is the correct polynomial.

    We do not release the PSA register definitions for general purpose use.

    You can use the the Safety Library functions available to calculate a PSA CRC on the desired memory. Please see APIs: STL_CRC_TEST_testNvMemory, and STL_CRC_TEST_calculateCrc, and STL_CRC_TEST_getCrcResult.

    Regards,
    sal
  • Hi Sal,

    Thanks for the clarification. I took your advice and identified a different solution. I created a couple of post build scripts that use the debug server scripting to load my outfile (with incorrect "golden" crcs), dump the PSA calculated CRCs and overwrite them in my source code. I then build the project again through the command line which gives me my outfile with golden CRCs.

    Regards,

    Noah Erickson

  • Noah,

    Ok. I have have misunderstood what you were ultimately asking for. I am happy you found a solution.

    sal