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.

TMS320F28379D: TMS320F2837xD Flash API: What is Fapi_issueProgrammingCommand()'s third argument?

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

In SPNU629A, page 14, it says the third argument is the number of 16 bit words in the data buffer (passed as arg #2). The "Sample Implementation" on page 18 agrees with that definition.

But the flash kernels in C2000Ware pass in the number of bytes instead of the number of 16 bit words. For example: C2000Ware_3_03_00_00_Software/device_support/f2837xd/examples/dual/F2837xD_sci_flash_kernels/cpu01//Shared_Boot.c. It declares a miniBuffer to be 8 Uint16 words long, fills it with 8 words of data, and passes sizeof(miniBuffer) as the third arg to Fapi_issueProgrammingCommand(). sizeof() is measured in bytes so sizeof(miniBuffer) should return 16, not the 8 one would expect if specifying the number of words.

So, what should the third arg be? What's in the document (# of words) or what the examples do (# of bytes)?

Mike

PS Why isn't the flash library available in ELF object format? Even TI calls it the "legacy COFF" format!

  • OK, I see what you did. sizeof(unit16_t) == sizeof(uint8_t) == 1! While legal under the C standard, I haven't had to deal with that kind of brain damage in 30+ years. When I last had to deal with a TI DSP processor as a matter of fact. Or a Harris 24 bit mini. So both the docs and the code are "right".

    Still would be nice to have the flash library available in ELF format. Having to support both ELF and "legacy COFF" is just an unneeded headache.

  • Mike,

    Regarding the kernel usage of sizeof(): You got it correct.

    Regarding EABI library:  Yes, we are migrating to EABI.  It will be made available soon in C2000ware.

    Thanks and regards,

    Vamsi