Other Parts Discussed in Thread: UNIFLASH, TMS570LC4357
Tool/software:
Hello Jagadish,
I have a project that, depending on a flag in a external memory:
- Uploads a binary file to the Flash memory, via SPI, then clears the flag and resets
- Makes the jump to the aplication
uint32_t transferAddress; // Address that is being written to.
void main(void){
uint16_t flashFlag;
sciInit();
spiInit();
sciSend(scilinREG, 34, "********************************\n\r");
sciSend(scilinREG, 34, "* OBC BootLoader program *\n\r");
sciSend(scilinREG, 34, "********************************\n\r");
uExtMem(FRAM1);
flashFlag = rExtMem(FLASH_FLAG_B, FRAM1, true);
sExtMem(FRAM1);
if(flashFlag == FLASH_REQUIRED){
sciSend(scilinREG, 23, "\n\rProgram Flash begin\n\r");
UpdaterSPI(SPI_PORT);
}
sciSend(scilinREG, 24, "\n\rJump to application...");
sciSend(scilinREG, 2, "\n\r");
transferAddress = (uint32_t)APP_START_ADDRESS; //#define APP_START_ADDRESS 0x001C0020
((void (*)(void))transferAddress)();
}
The binary file is stored in the correct Flash location (APP_START_ADDRESS), and it is the same as the one created by CCS.
This image works as expected when flashing with UniFlash.
I have provided you the full code in a private message.
Regards, Marco Mecha














