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.

TMS320F28075: flashAPI must run in RAM

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

Hi expert,

My customer is developing bootloader for F28075.

And they find TI demo have put the FlashAPI in ram.

I am not sure is it a must for F28075? They did not do this but it can work sometimes.

BR

Emma

  • Emma,

    On this device, flash API should be executed from RAM.  Example shows loading to flash and then copying to RAM at runtime for execution.

    Let me know if you have further questions.

    Thanks and regards,

    Vamsi

  • Vamsi,

    Thanks for your reply. The question is, customer's bootloader code did not finish this, but it can still work.

    however, they find the code will run away when add 1 instruction. so they are checking the root cause.

    attached customer command file.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/171/2807x_5F00_FLASH_5F00_CLA_5F00_lnk_5F00_cpu1.cmd

    did you see any problem?

    another question is, they find the assembly code will change after they run the function.

    this is the original source and assembly code:

    and after run the function, Fapi_setActiveFlashBank() The assembly code changed a lot.

    left:before run the function- right:after run the function

    we can see many instructions in the right:

    MOVB XAR0,#0x30
    ADDB XAR4,#67

    I am really want to know what does this mean?

    BR

    Emma

  • Emma,

    In the linker cmd file, I don' see flash API library mapped to flash for load and RAM for execution.  

    Please check the Flash API usage example provided in C2000Ware. In the example project, you will notice that the Flash API functions are executed from RAM. Observe below from the example:

    (a) Linker command file used in the example:  Allocates Flash API library to .TI.ramfunc section, which has a Flash load address and a RAM run address.

    (b) Example's main function calls memcpy() to copy the contents of the above section from Flash to RAM before they get executed.

    Above is mentioned in the Flash API FAQ page: e2e.ti.com/.../faq-faq-on-flash-api-usage-for-c2000-devices

    Thanks and regards,
    Vamsi

  • Vamsi,

    thanks. So there is a must to put the flash API into ram. am I right?

    another thing is why the assembly code changed after run the function?

    could you kindly help to look at this?

    BR

    Emma

  • Emma,

    Yes, copy from flash to RAM and execute form RAM.

    On the assembly code change: We can debug this if you observe this even after executing the API from RAM.  I don't think it will happen.  Let me know how it goes with RAM execution.  

    Thanks and regards,

    Vamsi