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.

CCS/TMS570LS3137: lwIP demo ERROR with ECC check

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN,

Tool/software: Code Composer Studio

Dear experts.

I want to use lwIP in tms570ls3137 hdk board, I use the demo from TI provided. "HALCoGen EMAC Driver with lwIP Demonstration" , and the version is v00.02.00.

Because I have no a DHCP server, so I use the static IP address, and the replace code is as follows:

ipAddr = lwIPInit(0, macAddress, htonl(inet_addr("192.168.4.120")) , htonl(inet_addr("255.255.255.0")), htonl(inet_addr("192.168.4.1")), IPADDR_USE_STATIC );

this is the only change part and the webserver is normally running.

Then, I want to add the diagnose function such as ECC, so I add some code in the sys_startup.c. the all codes are as follows.

/*************************************************************************/

   ......

_coreEnableEventBusExport_();

// new add code for ECC diagnose ----start


/* Enable response to ECC errors indicated by CPU for accesses to flash */
flashWREG->FEDACCTRL1 = 0x000A060AU;

/* Enable CPU ECC checking for ATCM (flash accesses) */
_coreEnableFlashEcc_();

// new add code for ECC diagnose ----end

if ((SYS_EXCEPTION & POWERON_RESET) != 0U)
{

    .......

/******************************************************************************************/

Then I use CCS7.2 to download the code into hkd board, then ESM error comes out, but the webserver function is continuously running.

The ESM error led keeps light all the time. and the ESM status register is shown in the following picture.

This is a single-bit error.  But I do known why.

So I hope get some help from you.

  • I am sorry to upload the error picture. 

    the first picture display the normal working which is monitoring by the UART. and the really pictures as follows.

     

  • hello,

    It is flash ECC error.

    You can find the flash address which causes the ECC error: FCOR_ERR_ADD register. The error address is captured during errors when either EOFEN or EZFEN enable bit is set.

  • Thank you for your reply.

    I do not care the TI demo, because it is a webserver function which is not my requirement.

    I write a tcp server demo based on the lwIP1.4.1 and work ok when communicate with a client. But the ecc error is also existing when the connecting is establishing.

    At the stage of server waiting client, the flash register and the esm register is as follows, and this stage with no any error.

    I do not know why the " Flash Uncorrectable Error Address Register" value is 8 but no ECC error generate.

    When I connect server and client (use a NetAssist.exe), the ECC error generate. the register status is as follows.

    Now the error address is found, and what's methods can you tell me to trace the error.

    wait for your reply, thank you.

  • with the enable of ECC flash check, I find a problem:

    In debug mode, when I use 'Memory Browser' to monitor a flash address, the ECC error is happened at once. 

    Does this avoid by the CCS setting ? 

  • Hello,

    The TRM has a statement that the ECC should be programmed before the ECC is enabled.

    The ECC values for all of the ATCM program memory space (Flash banks 0 through 6) must be programmed into the Flash before SECDED is enabled. The Cortex-R4 CPU may generate speculative fetches to any location within the ATCM memory space. A speculative fetch to a location with invalid ECC, which is subsequently not used, will not create an abort, but will set the ESM flags for a correctable or uncorrectable error. An uncorrectable error will unconditionally cause the nERROR pin to toggle low. Therefore care must be taken to generate the correct ECC for the entire ATCM space including the holes between sections and any unused or blank Flash areas.

    Please use linker cmd file to calculate ECC:

    http://processors.wiki.ti.com/index.php/LAUNCHXL2-570LC43-RM57L:_LinkerECCRecommendation