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: FAPI "ByByte" functions

Part Number: TMS320F28379D

Hi,

I am asking this question because I haven't found any information about "ByByte" functions within FAPI documentation (http://www.ti.com/lit/ug/spnu629a/spnu629a.pdf):

I need to erase, write and read (in FLASH) data which takes an odd number of 16-bit words and in order to avoid complicating my code I have decided to use:

- Fapi_doBlankCheckByByte() instead of using Fapi_doBlankCheck().

- Fapi_doVerifyByByte() instead of using Fapi_doVerify().

- Fapi_doMarginReadByByte() instead of using Fapi_doMarginRead().

My doubt is about parameter u32Length from "ByByte" functions I use: this parameter refers to the number of 32-bit words my data takes?

In case the answer is yes, why would you create a function called <whatever>ByByte if you can't actually do <whatever> by byte (by byte I mean a 16-bit word because it is the smallest word this uC can have)?

Thanks in advance!

Best regards,

Adria

  • Adria,

    "ByByte" functions are provided for Concerto ARM core. They are not supported for F2837xD devices, since C28x is a 16-bit addressing core. Hence, you can not find them in SPNU629A.

    You can program odd number of 16-bit words using Fapi_issueProgrammingCommand().
    However, the restriction is about verify - it needs length in 32-bit words. Since Flash read bus-width is 128-bits, we felt that 32-bit verify will balance the performance and flexibility and hence provided the 32-bit verify option. When you program only 16-bits, you can append the data with the other 16-bits of Flash data for verify (or) verify once 32 bits are programmed. Alternatively, you don't have to use the verify function from Flash API library - You can write code for CPU to read the location that you programmed to confirm it got programmed correctly. Coding a Flash read is similar to that of RAM - nothing special.

    Please let us know if you have any questions.

    Thanks and regards,
    Vamsi
  • Adria,

    I suggest you to look at the errata advisory titled "Flash: Minimum Programming Word Size".
    Here is the current errata link: www.ti.com/.../sprz412j.pdf

    Errata suggests to program 64-bits at-a-time.

    Let us know if you have any questions.

    Edit: Note added on March 3rd: Please note that I will not be able to check your reply until March 6th.

    Thanks and regards,
    Vamsi

  • Hi Vamsi,

    Okay. However, the functions are found in the header file and can be called. And I found out what my strange behavior was, so for now the ByByte functions are properly working on a F2837xD device. Do you strictly recommend me to stop using them, although they work for now?

    About the 32-bit restriction, it is found in all operations except for Fapi_issueProgrammingCommand(). So, to read you need to provide a pointer to 32-bit words, to erase you need to provide a pointer to 32-bit words and to either check blank or verify you need to provide a pointer to 32-bit words. The only function that accepts a pointer to 16-bit words is Fapi_issueProgrammingCommand().

    Best regards,

    Adria
  • Adria,

    Flash state machine used in the Flash wrapper is a byte machine. Hence, initially we thought of supporting byte functions as well and included them in the header and library (we did not document them though). However, we figured that there are some boundary conditions that can cause the functions to fail due to the architecture/compiler limitations. Hence, we decided to not document them anymore. We will remove them from header as well, sorry for any confusion. Please do not use byByte functions. Use only the functions that are mentioned in www.ti.com/.../spnu629a.pdf.

    Regarding the 32-bit discussion, I hope you are talking about u32length parameter:
    (1) For read functions (blank check, verify, margin read): Yes, the length of data to read can only be multiple of 32-bit words.
    (2) For program functions: Length can be multiple of 16-bits

    Let me know if you have other questions.

    Thanks and regards,
    Vamsi
  • Hi Vamsi,

    Thanks!

    Best regards,

    Adria