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/TMS320F28379D: Question about the F28379D Flash API

Part Number: TMS320F28379D
Other Parts Discussed in Thread: TMS320F28335, C2000WARE

Tool/software: Code Composer Studio

I do have a couple question with the TMS320F28379D Flash API. 

1st. Before, I am using TMS320F28335, When I am using the flash API to do Erase, program..., I have to disable the interrupt. But for 28379D, I read the document and did not see this requirement. Does that mean, I can access the flash (erase, program) even if the interrupt is still enabled? Of course, the flash I am trying to access is not the one with program code.

2nd. The F28335 need to load the flash API library into ram (do a memcopy()), however, the F28379D does not require to do that. Is that correct.

Is the difference because the 28379D chip have a separate flash pump to handle the flash operation instead using CPU like the F28335 did?

Thanks

  • Hi Hainan,

    For F28379D:

    1) Flash API execution is interruptible; However, there should not be any read or fetch access from any sector of the Flash bank/OTP when an erase or program operation is in progress. Therefore, the Flash API functions, the user application functions that call the Flash API functions, and any ISRs (Interrupt service routines,) must be executed from RAM.  

    2) It is required to execute the Flash API functions from RAM only. You need to copy them to RAM before executing.

    Please read section "2.3.3 Key Facts for Flash API Usage" in http://www.ti.com/lit/ug/spnu629a/spnu629a.pdf.

    Thanks and regards,
    Vamsi

  • I understood that all the function calls for Flash_API have to run from RAM. How about the Flash API library, does it have to be memcopy to the RAM?

    In the CMD file, I have:

    Flash28_API:
    {
    // -lF021_API_F2837xD_FPU32.lib(.econst)
    -lF021_API_F2837xD_FPU32.lib(.text)
    } LOAD = FLASHH,
    RUN = RAMGS6,
    LOAD_START(_Flash28_API_LoadStart),
    LOAD_SIZE(_Flash28_API_LoadSize),
    LOAD_END(_Flash28_API_LoadEnd),
    RUN_START(_Flash28_API_RunStart),
    PAGE = 0, ALIGN(4)

    And in the main.c, I have:

    memcpy((uint32_t *)&Flash28_API_RunStart, (uint32_t *)&Flash28_API_LoadStart, (uint32_t)&Flash28_API_LoadSize);

    It shows error:

    Description Resource Path Location Type
    #20 identifier "Flash28_API_LoadSize" is undefined F28xCPU1_SysCtrl.c /9500Controller_CPU1 line 106 C/C++ Problem
    #20 identifier "Flash28_API_LoadStart" is undefined F28xCPU1_SysCtrl.c /9500Controller_CPU1 line 106 C/C++ Problem
    #20 identifier "Flash28_API_RunStart" is undefined F28xCPU1_SysCtrl.c /9500Controller_CPU1 line 106 C/C++ Problem

    Could you let me know why?

    I did the same thing with F28335, it seems to be ok.

    I looked at the document SPNU629a, I could not find anywhere says the library should or should not load into RAM, could  you clarify?

  • Hainan,

    Are you using the latest C2000Ware device support files?  

    If yes, you would notice below memcpy() usage:

    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    And corresponding declaration as below (C2000Ware_x_xx_xx_xx\device_support\f2837xd\common\include\device.h) :

    extern uint16_t RamfuncsLoadStart;

    extern uint16_t RamfuncsLoadEnd;

    extern uint16_t RamfuncsLoadSize;

    extern uint16_t RamfuncsRunStart;

    extern uint16_t RamfuncsRunEnd;

    extern uint16_t RamfuncsRunSize;

    Also, note that these symbols are used in linker cmd:  \C2000Ware_x_xx_xx_xx\device_support\f2837xd\examples\dual\flash_programming\cpu01\flash_programming_cpu1_FLASH.cmd.

    Thanks and regards,
    Vamsi

  • Yes, I do have this mempcy:
    memcpy(&RamfuncsRunStart, &RamfuncsLoadStart, (size_t)&RamfuncsLoadSize);

    However, this is not my question, my question is that do I have to memcpy the "F021_API_F2837xD_FPU32.lib" to RAM
    as far as I know, the F28335 need to copy the FlashAPI library into ram, does F28379D need to do the same thing or not?
  • Hainan,

    You need to copy it to RAM for F28379D as well.

    Thanks and regards,
    Vamsi