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.

TMS320F2800137: Relation between start address and number of bytes that can be programmed in Flash API Programming

Part Number: TMS320F2800137
Other Parts Discussed in Thread: C2000WARE

Tool/software:

hi expert

in this problem

((+) [FAQ] RM46L852: Relation between start address and number of bytes that can be programmed in Flash API Programming - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

but i test in 2800137,

8 bytes writing at 0x8800A

This address can be written as 16*N+2 (16*0x88000+2), So according to previous given table at this address we can write 14 bytes. And here we are writing 8 bytes only so there won't be any issue in writing.

test result as follow,i write failed?why?it is diffeeent with RM46L852 's api lib?

buff

code:

test result

  • Hi,

    In 2800137 device you can program in 16-bit words instead of bytes. If start address is 128-bit aligned, then a max of eight 16-bit words (128-bits) can be programmed at a time.

    You can refer Flash API user guide and example program in C2000ware for more details (https://www.ti.com/lit/pdf/spruj96)

    Thanks & Regards,

    Rajeshwary

  • hi

    96 bit writing at 0x88000,it successfully.

    because a max of eight 16-bit words (128-bits),so i have writed 96 bit writing at 0x88000,so it should be  writed 32 bits from 0x88006,

    but it failed ?it jump to Interrupt_nmiHandler,why?

  • Hi Youjun,

    I think you are using AutoECCGeneration mode. Please note that

    "The Fapi_AutoEccGeneration  mode will program the supplied data in Flash along with automatically generated ECC. The ECC is calculated for every 64-bit data aligned on a 64-bit memory boundary. Hence, when using this mode, all the 64 bits of the data should be programmed at the same time for a given 64-bit aligned memory address. Data not supplied is treated as all 1s (0xFFFF). Once ECC is calculated and programmed for a 64-bit data, those 64 bits can not be reprogrammed (unless the sector is erased) even if it is programming a bit from 1 to 0 in that 64-bit data, since the new ECC value will collide with the previously programmed ECC value. When using this mode, if the start address is 128-bit aligned, then either 8 or 4 16-bit words can be programmed at the same time as needed. If the start address is 64-bit aligned but not 128-bit aligned, then only 4 16-bit words can be programmed at the same time. "

    Thanks & Regards,

    Rajeshwary