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: maximum FLASH length for CRC and ERRATA notes

Part Number: TMS320F280049
Other Parts Discussed in Thread: UNIFLASH

Hello,

I have several question regarding the C2000 linker and some errata notes:

  1. Is it a good practice to combine several memory blocks (either RAM or FLASH) into one big, for example:
    Flash sectors 3 to 15 into one big – FLASH_BANK0_SEC3_15  : origin = 0x083000, length = 0x00D000 ?
  2. To calculate the CRC value of a memory block we are using this function:
    uint32 getCRC32_vcu (uint32 input_crc32_accum, uint16 *msg, CRC_parity_e parity, uint16 rxLen);
    But this function accepts a memory length only as a 16-bit value.
    So, when we combine several sectors into one, linker can allocate a code in that way where its size is above 0x7FFF.
    As I understood, before calling this function we should multiply the size by 2, as we need number of bytes rather than number of words.
    If a code block in larger than 0x7FFF this multiplication overflows 16-bit value and the result is wrong.
    Are there any other methods for checking code consistency? Now, linker generates CRC values for each sector (.text, .cinit, .econst, …) and these values are placed into a special memory range which is predefined. Then bootloader reads these values and compare them with calculated (by getCRC32_vcu). But if a block is larger than 0x7FFF comparison returns an error.
  3. Does it make sense to not combine memory sectors in larger ones and keep them always smaller than 0x7FFF to not get an error similar above?
  4. In the Errata for the F280049 there is a note: Memory: Prefetching Beyond Valid Memory. If M1 is only used for .stack, does this advice apply for this memory sector also, or we can use full memory (0x400 instead of 0x3F8)?

Thank you

Best regards,
Viacheslav Potapov