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.

In TMS570LC4357 getting ESM interrupt when gioInit() is called

Other Parts Discussed in Thread: TMS570LC4357, UNIFLASH

Hello,

I am working on TMS570LC4357 kit. 

1) In code when I called gioInit() function then I am getting ESM interrupt. If I remove gioInit() then ESM interrupt is not comming.

2) If I add some code, then also ESM interrupt is generating. There is free space avaliable in RAM and ROM.

     Control is not reaching to added code but still ESM interrupt is generating. 

     Memory map is described below:

MEMORY CONFIGURATION

         name            origin    length      used     unused   attr    fill

----------------------  --------  ---------  --------  --------  ----  --------

  intvec                00000000   00000040  00000020  00000020  RWIX

  rom                   00000040   002fffc0  0000a604  002f59bc  RWIX

  system_mod            08000000   0003f000  0000163c  0003d9c4  RWIX

Regards,

Sagar Kumbhar

  • Hello:

    Could you check ESM status registers and let me know what is the reported error?

    Regards,

    Enrique

  • If code size is increased then in __TI_auto_init() function ESM interrupt is set. Refer attached screen shot for ESM register.

  • Hello:

    Please take a look at this post -> e2e.ti.com/.../1433796

    If that doesn't solve your problem, could you share your CCS project?

    Regards,

    Enrique
  • Hello,

      Before the __TI_auto_init() there is a function call to _cacheEnable_(). Move the _cacheEnable_() after the __TI_auto_init() and let us know if it solves the problem.

    • In Post suggested e2e.ti.com/.../1433796, they are getting ESM1.Stat2 = 0x00000008 and ESM1.Stat2 = 0x02000008. But we are only getting ESM1.Stat2 = 0x00000008.

    And we are not using VIM so can not use VIM to initialized the phantom vector. We are using ARM legacy interrupt structure.

    • Also calling _cacheEnable_() after __TI_auto_init() does not resolve the issue.

    • Flash Erase option in CCS Version: 6.1.0.00104 and also in CCS UniFlash Version: 3.3.0.00058 is not working.

    Erase is not writing 0xFF in all memory still some garbage data is present in flash. See attached below flash screenshot after erase.

     

    • We have used workaround to fill remining flash with 0xFF by below option in linker file:

    MEMORY
    {
       system_mod:      ORIGIN = 0x08000000  LENGTH = 0x3F000 fill=0xffffffff
       intvec :ORIGIN = ROM LENGTH = 0x40 fill=0xffffffff
       rom : ORIGIN = ROM+0x40 LENGTH = ROM_SIZE-0x40 fill=0xffffffff
    }

    • But it is taking too much time to download the code. So can you please suggest another alternative.

     

  • Hi Sagar,

      Another faster option would be to use the vfill command rathar than the fill command. Please see below example. You don't need to fill the system_mod as this is a RAM memory. The linker file use the virtual fill (vfill) command to fill the unused flash with 0xFF and also calculate the corresponding ECC for the program image. When you load the executable into flash using CCS, do not enable the auto-ECC again and do not do the verify as the ECC is already part of the binary that you are trying to load into flash. See also the right right side of below image about the On-chip Flash settings.

    MEMORY
    {
    /* USER CODE BEGIN (2) */
    /* USER CODE END */
        VECTORS (X)  : origin=0x00000000 length=0x00000020 fill=0xffffffff
        FLASH0  (RX) : origin=0x00000020 length=0x001FFFE0 vfill=0xffffffff
        FLASH1  (RX) : origin=0x00200000 length=0x00200000 vfill=0xffffffff
        STACKS  (RW) : origin=0x08000000 length=0x00001500
        RAM     (RW) : origin=0x08001500 length=0x0007EB00
    
    /* USER CODE BEGIN (3) */
    ECC_VEC (R) :    origin=0xf0400000 length=0x4     ECC={ input_range=VECTORS }
    ECC_FLA0 (R) :   origin=0xf0400004 length=0x3FFFC ECC={ input_range=FLASH0 }
    ECC_FLA1 (R) :   origin=0xf0440000 length=0x40000 ECC={ input_range=FLASH1 }
    
    /* USER CODE END */
    }
    
    /* USER CODE BEGIN (4) */
    /* USER CODE END */
    
    
    /*----------------------------------------------------------------------------*/
    /* Section Configuration                                                      */
    
    SECTIONS
    {
    /* USER CODE BEGIN (5) */
    /* USER CODE END */
        .intvecs : {} > VECTORS
        .text   align(8) : {} > FLASH0 | FLASH1
        .const  align(8) : {} > FLASH0 | FLASH1
        .cinit  align(8) : {} > FLASH0 | FLASH1
        .pinit  align(8) : {} > FLASH0 | FLASH1
        .bss     : {} > RAM
        .data    : {} > RAM
        .sysmem  : {} > RAM
    	
    
    /* USER CODE BEGIN (6) */
    /* USER CODE END */
    }
    
    /* USER CODE BEGIN (7) */
    /* USER CODE END */
    
    
    /*----------------------------------------------------------------------------*/
    /* Misc                                                                       */
    
    /* USER CODE BEGIN (8) */
    ECC {
    algo_name : address_mask = 0xfffffff8
    hamming_mask = R4
    parity_mask = 0x0c
    mirroring = F021
    }
    /* USER CODE END */
    /*----------------------------------------------------------------------------*/

  • With above solution issue is resolved. Thanks for support.