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.

TMS320F2806: TMS320F2806 RAM test

Part Number: TMS320F2806

Dear Team ,

Good day!

Our customer are trying to implement a non-destructive RAM test on the F2802 and F2806
controllers. This is a test to be run at power up, and before the C-runtime has been initialized and invoked.

They need to test the M0, M1 and L0 and L1 (in the case of F2806) memories. We
have the following questions:

1. Is it possible to insert and invoke the power on RAM test before the C runtime has been invoked? If yes, how and where would we need to insert
and invoke the RAM test code? We understand this has to be done in assembly code. We tried to use the sample application for F2802x provided in the
C2000MCU_IEC60730 library, but when we tried to build this sample application, we got a lot of link errors that we were unable to resolve.
2. Is there any way to implement the RAM test other than by using the C2000MCU_IEC60730? Would you be able to provide sample code for a self-contained RAM test i.e. one that does not depend on the
C2000MCU_IEC60730 library?
3. If there is no way around other than using the C2000MCU_IEC60730 library, this library currently only provides for the following RAM types to be tested (using function STL_MARCH_TEST_testSafeRam):
a. RAM_TYPE_STACK
b. RAM_TYPE_PIE_VECTOR
c. RAM_TYPE_PSA_CRC
d. RAM_TYPE_BOOT_RSVD
e. RAM_TYPE_PC_TEST_1
Since this does not appear to cover the M1, L0 and L1 memories completely, they are not sure how to use this function for our needs.
4. In the case of function STL_MARCH_TEST_testRam, we can specify the start and end addresses of the RAM to be tested (which means we can test M0, M1, L0 and L1), but is it possible to use this function before the C runtime has been initialized and invoked? If so how?

BR,

Leon.liu

  • 1. Is it possible to insert and invoke the power on RAM test before the C runtime has been invoked? If yes, how and where would we need to insert
    and invoke the RAM test code? We understand this has to be done in assembly code. We tried to use the sample application for F2802x provided in the
    C2000MCU_IEC60730 library, but when we tried to build this sample application, we got a lot of link errors that we were unable to resolve.

    Yes, that's possible. A lot of our example projects use the F2802x_CodeStartBranch.asm file to place code at the application entry point to jump to _c_int00. You would essentially just need to write a custom "code_start" function that executes the desired tests before calling _c_int00. Although if it's being run before the RAM initialization, why does it need to be non-destructive?

    If you can describe the errors, I can try to help resolve them. Was the package installed as described in the readme.txt?

    2. Is there any way to implement the RAM test other than by using the C2000MCU_IEC60730? Would you be able to provide sample code for a self-contained RAM test i.e. one that does not depend on the
    C2000MCU_IEC60730 library?

    You could just grab the STL_march_test.asm file and it's related header files from the installation and use it directly in the project instead of using the whole library.

    3. If there is no way around other than using the C2000MCU_IEC60730 library, this library currently only provides for the following RAM types to be tested (using function STL_MARCH_TEST_testSafeRam):
    a. RAM_TYPE_STACK
    b. RAM_TYPE_PIE_VECTOR
    c. RAM_TYPE_PSA_CRC
    d. RAM_TYPE_BOOT_RSVD
    e. RAM_TYPE_PC_TEST_1
    Since this does not appear to cover the M1, L0 and L1 memories completely, they are not sure how to use this function for our needs.

    The function could be modified for additional RAM types or to remove the RAM types parameter and replace it with pStartAddress and pEndAddress parameters like the STL_MARCH_TEST_testRam function uses to make it more generic.

    4. In the case of function STL_MARCH_TEST_testRam, we can specify the start and end addresses of the RAM to be tested (which means we can test M0, M1, L0 and L1), but is it possible to use this function before the C runtime has been initialized and invoked? If so how?

    Does my answer to question 1 already sufficiently answer this?

    Whitney

  • Dear Whitney,

    Thank you for your help.

    For the question 2 :

    We included the above asm file in our project and the following header files -STL_type.h, STL_user_config.h, STL_system_config.h,
    STL_device.h. We have set BUILD_LIB_F2802X 1 and BUILD_LIB_F2806X 0. We also modified STL_device.h to include "DSP280x_Device.h" instead of "DSP2802x_Device.h" as we didn't have this file available. When we try to build we are getting errors and I have attached the error log with this email.

    BR,

    leon.liu

  • The warnings about the typedefs are probably about STL_type.h. You could try just #including stdint.h instead of STL_type.h or at least comment out the lines in STL_type.h that are causing the warnings.

    Do you have any indication what file those "Instructions not permitted" are referring to? That code doesn't look like anything in the STL_march_test.asm file. Does it seem to be in a compiler-generated assembly file (that's what I'm guessing from the "Temp" path)?

    Whitney