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.

Prefectch abort SafeTI Library Porting

Other Parts Discussed in Thread: TMS570LS0432, TMS570LS0332, TMS570LS0232

Hi,

I am using TMS570LS0332 in mz design. I have ported the safeTI library given in the demo application of TMS570LS0432 to my application. I am getting the prefetch abort exception in the SRAM self test function shown below.

SL_SelfTest_SRAM(SRAM_ECC_ERROR_FORCING_2BIT, TRUE, &failInfoTCMRAM);

R14_SVC register is pointing to the following line of code Disassembly.

BL              $../safety_library/source/sl_asm_api.asm:514:521$

CP15_INSTRUCTION_FAULT_ADDRESS register is : 0xFFFFF8FC

what could be the cause of the abort? I am not able to find the issue caused this.

Thanks & Best Regards,

Sreekanth Reddy Challa

  • Check the .map file that was generated by the linker and make sure that the library did not get located above 256KB of flash. The TMS570LS0332 has only 256KB but the TMS570LS0432 has 384KB of flash.
  • Hi Bob,

    Thanks for the prompt response. I checked the map file. I do not see any code which is outside of the micro controller flash size.The linker file is modified as follows.

    MEMORY
    {
    VECTORS (X) : origin=0x00000000
    length=0x00000020
    fill=0xffffffff
    FLASH_API (RX) : origin=(end(VECTORS))
    length=(0x00002000 - size(VECTORS))
    vfill=0xffffffff

    // Updated from TMS570LS0232 to TMS570LS0332
    FLASH0 (RX) : origin=(end(FLASH_API))
    length=0x0003DFE0
    vfill=0xffffffff

    STACKS (RW) : origin=0x08000000 length=0x00002000
    RAM (RW) : origin=0x08002000 length=0x00005C00

    // PROFILE(RW) : origin=0x08007800 length=0x00000400 /* Added for profiling purposes */
    LOG (RW) : origin=0x08007C00 length=0x00000400 /* Added for logging purposes */
    FEE (R) : origin=0xF0200000 length=0x00000064 fill=0xDEADBEEF /* For FEE testing, Valid only for sample application */


    /* USER CODE BEGIN (2) */
    /* USER CODE END */
    }

    The map file does not  any code outside of the flash memory location of any controller.

  • The safety library (v2.3.0) uses the following conditional statement:

    #if defined(_TMS570LS31x_) || defined(_TMS570LS12x_) || defined(_RM48x_) || defined(_RM46x_) || defined(_RM42x_) || defined(_TMS570LS04x_)
    

    Even though you are using a TMS570LS0332, make sure you still have "_TMS570LS04x_" defined.

    If that is not the problem, then I suggest adding a hardware breakpoint to the bl instruction causing the problem. If it looks like it wants to branch to address 0xFFFFF8FC, then you will have to work backwards to figure out why it got the wrong address.