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.

TMS320F280049: Writing test data to Flash via SCI communication

Guru 13885 points

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hi, 

It is necessary to write test data before mass production to Flash.
At that time, I would like to refer to the sample of the flash API program below.
flashapi_ex1_programming (in C:\ti\c2000\C2000Ware_4_01_00_00\driverlib\f28003x\examples\flash)
https://dev.ti.com/tirex/explore/node?node=A__ACloos8.dm1l8uL2xKRb2A__c2000ware_software_package__gYkahfz__LATEST

This sample shows how to erase/write a bank. By incorporating these into the application code, we believe it is possible to write test data to Flash via SCI communication.

We are considering a method of executing the application code in flash bank 0/1, storing pre-manufacturing test information in a buffer via external communication (SCI, etc.), and writing the contents to flash bank 2.

Q1. Is the above feasible?
Q2. If Q1 is yes, can you give me some simple advice on how to fix it in the sample code?
Q3. Please let me know if there is an easier way to achieve this than Q1.

Thanks,

Astro

  • Hi,

    The subject matter expert is out of office due to holiday break. Please expect response by 1st week of January. Sincere apology for inconvenience.

    Regards, Santosh

  • Hi Astro,

    For your questions:

    1) Yes, for writing the test data you will have to make sure that Bank 2 is used for it.

    2) The sample code contains operations for erase/program as you know. The modification required to write to flash Bank 2 from the buffer would be to change the linker cmd file to not reserve Bank 2/it's sectors.  

    3) I'll have to look into what other ways are possible, but it seems that the test data can be written by modifying the kernel for your device, so that way after the application has been programmed to bank 0/1, the kernel can then write the test data to bank 2.

    To recap, you want to have the kernel in ROM and expanded to RAM at SCI_Boot detection, the application programmed in Banks 0/1, and the test data written from SCI buffer to Bank 2. Is this correct? 

    Thanks,

    Charles

  • Hi, Charles

    Where in the ROM should the kernel write to in this case? (BANK0,1,2 etc.)
    Also, I would like to know how to expand the kernel written in ROM to RAM.
    I don't really understand how the program works.

    Thanks,

    Astro

  • Hi Astro,

    By ROM we are meaning Flash memory and not Boot ROM correct? 

    There are example configurations found here: C:\ti\c2000\C2000Ware_4_02_00_00\device_support\f28004x\common\cmd which show the 28004x_flash_bank0_LDFU_lnk.cmd which is what is needed for the kernel. The kernel file itself needs to be modified to write the test data to bank2, with its files that can be found here C:\ti\c2000\C2000Ware_4_02_00_00\driverlib\f28004x\examples\flash .

    Thanks,

    Charles

  • Hi, Charles

    At this time, we are not considering firmware updates for BANK0 and BANK1. What we are currently considering is saving test data to BANK2 via SCI while executing the application code. To do this, change the linker command file in the sample Flash API program so that it does not reserve bank 2/its sectors.
    Also, in that case, there is no need to store the kernel in ROM.

    Is this my understanding correct?

    Thanks,

    Astro

  • Hi Astro,

    That is fine if BANK0 and BANK1 do not require updates, then this means they are pre-loaded to the device?. Yes the linker command file for your application program must not use bank 2/its sectors. In this case, you do not need to store the kernel in ROM either. If you at any point wanted to update the test data, then you could place the Flash kernel in RAM. You are correct on this. If any further clarification is needed, I think it would be better if we had a call over this.

    Thanks,

    Charles