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.

Will Flash API work on TMS320F28030 / 31 ?

Other Parts Discussed in Thread: TMS320F28031, TMS320F28030

Hello All

In the file "Example_Flash2803x_API.c" in the conditional definition of sectors (given below) I do not see reference to TMS320F28030 and TMS320F28031. Will flash API work on them? Atleast in TMS320F28031 there are 8 sectors of 2k each, where as TMS320F28030 has only four sectors.

Please clarify.

Thanks

Sayee

#if (FLASH_F28035 || FLASH_F28034)
#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,
};

#elif (FLASH_F28033 || FLASH_F28032)
#define FLASH_START_ADDR 0x3F0000
SECTOR Sector[8] = {
(Uint16 *) 0x3F0000,(Uint16 *) 0x3F0FFF,
(Uint16 *) 0x3F1000,(Uint16 *) 0x3F1FFF,
(Uint16 *) 0x3F2000,(Uint16 *) 0x3F2FFF,
(Uint16 *) 0x3F3000,(Uint16 *) 0x3F3FFF,
(Uint16 *) 0x3F4000,(Uint16 *) 0x3F4FFF,
(Uint16 *) 0x3F5000,(Uint16 *) 0x3F5FFF,
(Uint16 *) 0x3F6000,(Uint16 *) 0x3F6FFF,
(Uint16 *) 0x3F7000,(Uint16 *) 0x3F7FFF,
};
#endif

  • Sayee,

    Yes, the F2803x Flash API does support F28030 device.

    Include this code snippet below before the main function.

    #elif FLASH_F28030
    #define FLASH_START_ADDR 0x3F4000
    SECTOR Sector[4] = {
    (Uint16 *) 0x3F4000,(Uint16 *) 0x3F4FFF,
    (Uint16 *) 0x3F5000,(Uint16 *) 0x3F5FFF,
    (Uint16 *) 0x3F6000,(Uint16 *) 0x3F6FFF,
    (Uint16 *) 0x3F7000,(Uint16 *) 0x3F7FFF,
    };

    Regards,
    Manoj
  • Manoj

    There is an error in your code snippet.

    sector[3] should end at 0x3F 7FF8 rather than going up to 0x3F7FFF for setting aside the CSM keys.

    I also notice an ascending order-descending order confusion in the naming / mapping / API interface for the flash sectors. SECTORA is the lowest in bit defines (in flash API library) , highest in physical memory location and the last element in the sector table!

    Thanks

    Sayee

  • Sayee,

    The code snippet provided earlier is indeed correct.

    The sector definition mentioned here will be used to pass arguments to flash api functions for flash erase / program operation. Hence we need to provide complete sector information without ignoring CSM password location.

    Regarding your next question, I agree it can be quite confusing. But since most of the definitions are provided by TI. From users standpoint, they were meant to be seamless.

    Regards,
    Manoj