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.

TMS320F28069: Flash erase question

Part Number: TMS320F28069
Other Parts Discussed in Thread: CONTROLSUITE

Hi expert, 

My customer is porting his code from F28067 to F28062 due to lack of supply.

And they found the flash sector is not the same for these two parts.

One sector of F28062 is 8K

One sector of F28067 is 16k.

so they want to ask, when they call the function 'Flash_Erase(SECTORB,&FlashStatus)'

how does the code judge how long to erase?

I have found we have some demo in controlsuite. which have a defination.

#if (FLASH_F28069 || FLASH_F28068 || FLASH_F28067 || FLASH_F28066)
#define FLASH_START_ADDR  0x3D8000
SECTOR Sector[8]= {
         (Uint16 *) 0x3D8000,(Uint16 *) 0x3DBFFF,
         (Uint16 *) 0x3DC000,(Uint16 *) 0x3DFFFF,
         (Uint16 *) 0x3E0000,(Uint16 *) 0x3E3FFF,
         (Uint16 *) 0x3E4000,(Uint16 *) 0x3E7FFF,
         (Uint16 *) 0x3E8000,(Uint16 *) 0x3EBFFF,
         (Uint16 *) 0x3EC000,(Uint16 *) 0x3EFFFF,
         (Uint16 *) 0x3F0000,(Uint16 *) 0x3F3FFF,
         (Uint16 *) 0x3F4000,(Uint16 *) 0x3F7FFF,

#elif (FLASH_F28065 || FLASH_F28064 || FLASH_F28063 || FLASH_F28062)
#define FLASH_START_ADDR  0x3E8000
SECTOR Sector[8]= {
         (Uint16 *) 0x3E8000,(Uint16 *) 0x3E9FFF,
         (Uint16 *) 0x3EA000,(Uint16 *) 0x3EBFFF,
         (Uint16 *) 0x3EC000,(Uint16 *) 0x3EDFFF,
         (Uint16 *) 0x3EE000,(Uint16 *) 0x3EFFFF,
         (Uint16 *) 0x3F0000,(Uint16 *) 0x3F1FFF,
         (Uint16 *) 0x3F2000,(Uint16 *) 0x3F3FFF,
         (Uint16 *) 0x3F4000,(Uint16 *) 0x3F5FFF,
         (Uint16 *) 0x3F6000,(Uint16 *) 0x3F7FFF,

does customer have to add the same code in their project?

Besides, they found 8K erase can also succeed in F28067, can they use the same length group for these two project, since it is for same project in customer.



  • Hi Emma,

    Our team will get back to you in a day or two.

    Thanks and regards,

  • Emma,

    Even though the flash sector size/address changes across the device, erase is still done by sector, so that Sector B will be the correct addresses regardless of the device when the API is called.  So calling erase API with Sector B as argument will always work, but depending on the device a different amount/addresses of flash will get erased.

    Customer should add the above to their code, but I believe this more code swaps/moves so that the addressing is know to the relative code portions.

    As you have noted in the above, the addresses have changed, both for the flash start address and size of the sector boundaries.  In migrating customer will need to consider both, I know the start address is obvious; but for flash programming/erasing they will need to judge if their API calls should change; i.e. if previously they were erasing programming sector B only; those addresses are now in Sectors C and D on the smaller device.

    I'm not sure what is meant by 8K erase works on 28067, erase will be by sector always, size will be determined by the device.