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.

TMS570LS1227: TMS570LS1227: F021 v02.01.01 API causes prefetch abort

Part Number: TMS570LS1227

Hi All,

I am using flash Api V2.01.0  of TI for TMS570LS1227.  I am sharing  with you my codes snip that fall the infinite loop. I saw two different mistake at code. When I push directly “Play” button at Debug Mode,  code is run into Fapi_BlockErase function(at F_Api_2.PNG) and code goes to infinite loop at line 201(Picture BlockEraseFuntion) but when i paused the debug, it fall prefetch abort page. However if I use it with “StepOver”  button step by step I can pass the BlockErase function and code can erease the flash banks after that it run into infinite loop at line 439 Fapi_Issue_ProgrammingCommand function (Picture F_Api_1) at debug mode. Then I stopped the code and saw my two byte data on flash memory at debug mode.

 Also I am using three different disable Interrupt functions ( _disable_interrupt_() / _disable_IRQ_interrupt_() / _disable_FIQ_interrupt_() ) before go in to fapi functions.

Can you offer different things about this and do you have flash programming code example for TMS570LS1227 ?

  

  • Hi Onur,

    Are the F021 Flash APIs and related code/constants copied to RAM, and executed from SRAM?

    The API related code is bl_flash.c in your example. You can use this way to map the section to RAM, then copy this section to SRAM in your main():

    SECTIONS
    {
    .intvecs : {} > VECTORS

    flashAPI:
    {
        .\source\Fapi_UserDefinedFunctions.obj (.text, .data)
        .\source\bl_flash.obj (.text, .data)
        --library= "c:\ti\Hercules\F021 Flash API\02.01.01\F021_API_CortexR4_BE.lib" (.text, .data)
    } palign=8 load = FLASH0, run = SRAM, LOAD_START(apiLoadStart), RUN_START(apiRunStart), SIZE(apiLoadSize)

  • Thank you Mr. Wang actually I saw same answer from you at different person's question after I asked to here  then I used this code snippet, solve the problem.

    Can I ask different question about fapi at below this topic?

  • Hi Onur,

    I'd like to open a new thread for different question. Thanks