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.
For the TMS570LS3137 device Boot Loader Example available at the location http://processors.wiki.ti.com/index.php/TMS570_Hercules_MCU_Bootloader following Sectors Marked in Green I am able to Erase and Reprogram but the address starting from 0x00200000 to 0x002E0000 It is unable to Erase Or write to these Sectors .
(void *)0x00000000, 0x08000, 0, 0, 0xfff87000,
(void *)0x00008000, 0x08000, 0, 1, 0xfff87000,
(void *)0x00010000, 0x08000, 0, 2, 0xfff87000,
(void *)0x00018000, 0x08000, 0, 3, 0xfff87000,
(void *)0x00020000, 0x20000, 0, 4, 0xfff87000,
(void *)0x00040000, 0x20000, 0, 5, 0xfff87000,
(void *)0x00060000, 0x20000, 0, 6, 0xfff87000,
(void *)0x00080000, 0x20000, 0, 7, 0xfff87000,
(void *)0x000A0000, 0x20000, 0, 8, 0xfff87000,
(void *)0x000C0000, 0x20000, 0, 9, 0xfff87000,
(void *)0x000E0000, 0x20000, 0, 10, 0xfff87000,
(void *)0x00100000, 0x20000, 0, 11, 0xfff87000,
(void *)0x00120000, 0x20000, 0, 12, 0xfff87000,
(void *)0x00140000, 0x20000, 0, 13, 0xfff87000,
(void *)0x00160000, 0x20000, 0, 14, 0xfff87000,
(void *)0x00180000, 0x20000, 1, 0, 0xfff87000,
(void *)0x001A0000, 0x20000, 1, 1, 0xfff87000,
(void *)0x001C0000, 0x20000, 1, 2, 0xfff87000,
(void *)0x001E0000, 0x20000, 1, 3, 0xfff87000,
(void *)0x00200000, 0x20000, 1, 4, 0xfff87000,
(void *)0x00220000, 0x20000, 1, 5, 0xfff87000,
(void *)0x00240000, 0x20000, 1, 6, 0xfff87000,
(void *)0x00260000, 0x20000, 1, 7, 0xfff87000,
(void *)0x00280000, 0x20000, 1, 8, 0xfff87000,
(void *)0x002A0000, 0x20000, 1, 9, 0xfff87000,
(void *)0x002C0000, 0x20000, 1, 10, 0xfff87000,
(void *)0x002E0000, 0x20000, 1, 11, 0xfff87000
For BANK 0 Sectors the F021 API Functions are used in following sequence
Fapi_initializeFlashBanks(Freq_In_MHz);
Fapi_setActiveFlashBank((Fapi_FlashBankType)bk);
Fapi_enableMainBankSectors(0xFFFE);
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, eraseStartAddr);
For BANK 1 Sectors the F021 API Functions are used in following sequence
Fapi_initializeFlashBanks(Freq_In_MHz);
Fapi_setActiveFlashBank((Fapi_FlashBankType)bk);
Fapi_enableMainBankSectors(0xFFFE);
Fapi_enableEepromBankSectors(0xFFFFFFFFU, 0xFFFFFFFFU); /* this fixed 0x00180000 to 0x001E0000 Sectors Erase and Write */
Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, eraseStartAddr);
The Flash Setup function is as follows
void setupFlash(void)
{
/** - Setup flash read mode, address wait states and data wait states */
flashWREG->FRDCNTL = 0x00000000U
| (3U << 8U)
| (1U << 4U)
| 1U;
/** - Setup flash access wait states for bank 7 */
FSM_WR_ENA = 0x5;
EEPROM_CONFIG = 0x00030002;
/** - Disable write access to flash state machine registers */
FSM_WR_ENA = 0xA;
/** - Setup flash bank power modes */
flashWREG->FBFALLBACK = 0x00000000
| (SYS_ACTIVE << 14U)
| (SYS_SLEEP << 12U)
| (SYS_SLEEP << 10U)
| (SYS_SLEEP << 8U)
| (SYS_SLEEP << 6U)
| (SYS_SLEEP << 4U)
| (SYS_ACTIVE << 2U)
| SYS_ACTIVE;
}
Fapi_issueProgrammingCommand((uint32_t *)dst,
(uint8_t *)src,
(uint32_t) bytes,
0,
0,
Fapi_AutoEccGeneration);
while( FAPI_CHECK_FSM_READY_BUSY == Fapi_Status_FsmBusy );
while(FAPI_GET_FSM_STATUS != Fapi_Status_Success); <-- Fails and loops at this instruction