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.

TMS570LS3137: TMS570LS3137

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

hi,

I have a TMS570LS31x hercules kit. I want to have a simple code continuously running in main for checking the cpu registers, lockstep and ram (filled with some pattern) to see if any upset occur and then report this error by printf. Are there any suggestions for a simple code checking this, recommendations for settings and code example?

Please provide detailed steps.

  • Hello Eric,

    No, we don't have example code for this purpose. You can use HALCoGen to generate the driver to do those kind of jobs.

    In HALCoGen, you can enable: CPU selftest, CCM selftest, and SRAM ECC check, then the selftest code is generated.

    For filling the SRAM and reading the data back, it is very straight forward. For example:

    void FILL_SRAM_32BIT(unsigned int Start_Address,
    unsigned int No_Of_Words,
    unsigned int Pattern)
    {
    unsigned int *Addr = (unsigned int *) Start_Address;
    while(No_Of_Words > 0) {
    *Addr++ = Pattern;
    No_Of_Words--;
    }
    }

    unsigned int CHECK_SRAM_32BIT( unsigned int Start_Address,
    unsigned int No_Of_Words,
    unsigned int Pattern)
    {
    unsigned int ReadPattern;
    unsigned int *Addr = (unsigned int *) Start_Address;
    while(No_Of_Words > 0)
    {
    ReadPattern = *Addr++;
    if (ReadPattern != Pattern) {
    return ((unsigned int)Addr);
    }
    No_Of_Words--;
    }
    return (0);
    }