TMDSCNCD28P65X: How to upload code to flash

Part Number: TMDSCNCD28P65X
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi,

I'm designing a converter prototype and am using the TMDSCNCD28P65X control card. I have code developed in code composer and have been using the debug feature in CCS to enable the controller. The end goal is to have the code run by itself when the MCU is powered up without having to use CCS to put it into debug mode and press the resume button to run the code. How can I achieve that? How do I load the code into memory so that the converter will run by itself?

Thank you

-Mike Allette

  • Hello,

    Programming the flash standalone can be accomplished using the peripheral bootloading utilities in the boot ROM. I will note they can only program the RAM, so a kernel is required to program the flash.

    Please read this user's guide for more information: https://www.ti.com/lit/ug/sprujh3/sprujh3.pdf

    Best,

    Matt

  • Hi Matt,

    Thank you so much for the response.

    What is the difference between loading the code to Flash vs RAM? Which is typically used? What would be the reason to use one over the other?

  • Hi Mike,

    Code executing in the RAM benefit from faster execution and memory access times compared to Flash. Flash is a wait-stated memory (RAM is 0 wait-stated). However, Flash is non-volatile so data persists on power-loss. 

    You can load the code to Flash and copy it to RAM at runtime and execute it from RAM.  Please check C2000Ware examples - they should have both RAM build and Flash build configurations.  If you look at Flash build example, you will notice the .Ti.ramfunc section.  This section is mapped to Flash for load but run address will be a RAM address.  Examples use memcpy() to copy the Flash content to RAM before executing it. 

    Best,

    Matt