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.

TMS320F280049C: ECC calculation with linker is partly correct, partly incorrect

Part Number: TMS320F280049C
Other Parts Discussed in Thread: UNIFLASH

Hello,

I'm trying to load ECC results from CCS with using linker command file. I updated linker command file, closed the autoECCCalculation from properties and enabled ECC calculation in linker with "--ecc=on" directive. 

The problem is, every ECC result area is correctly calculated except program memory sectors(which are combination of 6 sectors). I have read the Linker->ECC part of the "spru513x_TMS320C28x_AssemblyLanguageTools_v21.12.0.STS" document and a post from"e2e.ti.com/.../faq-faq-for-flash-ecc-usage-in-c2000-devices---includes-ecc-test-mode-linker-ecc-options" . Apart from these, I also researched many topics in E2E but I couldn't find a solution. 

I am attaching the linker command file that I use. Waiting for your help.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "t122_cnm_v1r0_00.h"
#define ECC_TEST_DISABLE 1//ECC test konfigürasyonu için bu değeri 0 yapın.
MEMORY
{
PAGE 0 :
RAMM0 : origin = 0x0000F3, length = 0x00030D
RAMLS01 : origin = 0x008000, length = 0x001000 //not modified - CLA PROGRAM
//RAMLS1 : origin = 0x008800, length = 0x000800 //not modified - CLA PROGRAM
//Asagidaki alanlar birlestirildi.
RAMLS2 : origin = 0x009000, length = 0x000800
RAMLS3 : origin = 0x009800, length = 0x000800
//Birlesik taným
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thanks,

  • Hi Fahri,

    If I understand correctly, you are saying that ECC is not generated correctly for FLASH_BANK0_SEC123456 and FLASH_BANK1_SEC12131415.  Correct?

    Please provide more details on how you confirmed that the generated ECC is incorrect -> Did you notice ECC errors during memcpy()?

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    First of all, thank you for your quick reply.

    What I said is I observed ECC error for FLASH_BANK0_SEC123456 only. Other combined sectors have no problem.

    I used UNIFLASH program to compare methods. First, I used autoGenerateECC option and saved the correct ECC results. Then I used Linker Command File generated method and look at the ECC Storage which starts at 0x1080200 for FLASH_BANK0_SEC123456. I also checked the start and end addresses of other sectors' ECC results and they were fine.  

    I didnt notice the error during memcopy actually I didnt look to it. What are the steps I should follow..

    Also I created another example project to test sector combination. I combined the sectors which are used by .text section. Also I used combined sector at _TI_RAM_FUNC section but no error occured. 

    Fahri

  • Hi Fahri,

    Thank you for the info.  I will get back to you Tuesday next week (2/8).

    Thanks and regards,
    Vamsi

  • Fahri,

    Linker generates ECC assuming 0xFFFF (VFILL value given in the linker cmd) for all the locations in the input range that don't have any data mapped to them.  Hence, UniFlash's AutoEcc may not match for each 64-bit aligned data. 

    Can you enable ECC-evaluation (ECC_ENABLE register in section 3.14.14 FLASH_ECC_REGS of the TRM) and read the entire flash space?  If there are single bit errors, they will be logged in the ECC error registers (you can also configure for an interrupt).  If there is an uncorrectable error, an NMI will be generated (also gets logged in the ECC error registers).  This will help understand whether the ECC is generated correctly or not.  

    Thanks and regards,
    Vamsi

  • Vamsi,

    Firstly, I am writing the following parafraph just to re-inform.

    I used CCS for all loading/programming, not Uniflash. I just used uniflash for reading memory. I loaded same code with two options which are autoECC or LinkerGenerated ECC. So I am prety sure about that ECC calculation is wrong or missing. You now Linker generated ECC results are not 0xFF for non-calculated/empty areas so I am not sure about ECC calculation is done for program memory( FLASH_BANK0_SEC123456)

    I will follow your suggestions and rewrite here.

    Thanks and regards,

    Fahri

  • Vamsi,

    If I understood what you said correctly, I did your suggestion. I read some programMemory locations. I am attaching the screenshots of my results. 

  • Hi Fahri,

    Thank you for the update.  I will review and get back to you in a day or two (February 14th).

    Best regards,
    Vamsi

  • Hi Fahri,

    Thank you for loading the linker generated ECC and then read the flash with ECC-evaluation enabled. 

    Can you send a sample project so that our compiler team can reproduce?  

    Thanks and regards,
    Vamsi 

  • Hi Vamsi,

    Project codes cannot be shared due to policy of company. But I will try to create a new project by simplifying the project and keeping the error. I will get back to you in a two day because I'm very busy these days. I'm grateful for you assistance.

    Fahri

  • Hi Fahri,

    Sure, that is fine.  I will keep this open.

    Thanks and regards,

    Vamsi

  • Hi Fahri,

    Did you get a chance to create a project for us to reproduce it?  

    Please let me know if I can close this post.  

    Thanks and regards,

    Vamsi