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.

LAUNCHXL-F280025C: DFU / LDFU with GUI

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: C2000WARE

Hi,

I would like to do firmware upgrade to F280025 without GUI e.g. via Bluetooth / other MCU UART.

after studies and search the forum, look liked C2000 doesn't support firmware upgrade without prior download Flash Kernel via GUI / serial_flash_programmer.exe, is that correct  ?

one of the reason I need DFU without GUI is my application is highly sealed or unreachable for connecting serial port ! 

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1218641/tms320f28379d-how-to-update-firmware-via-sci

Danny

  • Hi,

    don't why I couldn't edit my post, so I add new found here instead ....

    under this topic say 280025c has flash-api built into BOOT ROM, does it mean I can do DFU without download flash kernel / GUI ?

    https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1074702/tms320f280025-q1-flash-api-usage

    Danny

  • Hi Danny,

    Currently there exists an LFU implementation for this device in C2000Ware: 

    C:\ti\c2000\C2000Ware_5_02_00_00\driverlib\f28002x\examples\flash

    that details the build using the f28002x_lfu_singlebank project. 

    Thanks and regards,

    Charles

  • Hi Charles, 

    I have downloaded these examples, but look liked this approach was based on flash_programmers.exe, all I need is without flash_programmers.exe intervention. 

    Can I use custom boot + main application approach ?

    1. boot part codestart address 0x080000, with flash API loaded and run on RAM, SCI can able to communicated with second MCU externally ...

    #pragma CODE_SECTION(init_Flash, ".TI.ramfunc");
    
    void init_Flash(void)
    {
        Fapi_StatusType  oReturnCheck;
    
        oReturnCheck = Fapi_initializeAPI(F021_CPU0_BASE_ADDRESS, DEVICE_SYSCLK_FREQ/1000000U);
    
        if(oReturnCheck != Fapi_Status_Success)
        {
        }
    
        oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
    
        if(oReturnCheck != Fapi_Status_Success)
        {
        }
    
        return;
    }
    
    
    #pragma CODE_SECTION(programAutoECC, ".TI.ramfunc");
    
    void programAutoECC(UARTHandle handle)
    {
        UART_Vars_t *obj = (UART_Vars_t *)handle;
    
        uint32_t *Buffer32 = (uint32_t *)obj->bleVarObj.BLE_SetVar_Buffer;
    
        uint32_t u32Index = 0;
        uint16_t i = 0;
        Fapi_StatusType  oReturnCheck;
        Fapi_FlashStatusType  oFlashStatus;
        Fapi_FlashStatusWordType  oFlashStatusWord;
    
        //sector size is 4096 WORD, which is 8K byte in size
        for(i=0, u32Index = FLASHBANK0_VAR; (u32Index < (FLASHBANK0_VAR + WORDS_IN_FLASH_BUFFER)); i += 8, u32Index += 8)
        {
    
            oReturnCheck = Fapi_issueProgrammingCommand((uint32 *)u32Index, obj->bleVarObj.BLE_SetVar_Buffer + i, 8, 0, 0, Fapi_AutoEccGeneration);
    
            while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy);
    
            if(oReturnCheck != Fapi_Status_Success)
            {
                example_Error = 3;
                //Example_Error(oReturnCheck);
            }
    
            oFlashStatus = Fapi_getFsmStatus();
            if(oFlashStatus != 0)
            {
                example_Error = 4;
                //FMSTAT_Fail();
            }
    
            Buffer32 = (uint32 *)obj->bleVarObj.BLE_SetVar_Buffer;
    
            oReturnCheck = Fapi_doVerify((uint32 *)u32Index, 4, Buffer32 + (i/2), &oFlashStatusWord);
    
            if(oReturnCheck != Fapi_Status_Success)
            {
                example_Error = 5;
                //Example_Error(oReturnCheck);
            }
        }
        return;
    }
    
    
    
    #pragma CODE_SECTION(eraseSector, ".TI.ramfunc");
    
    void eraseSector(void)
    {
        Fapi_StatusType  oReturnCheck;
        Fapi_FlashStatusType  oFlashStatus;
        Fapi_FlashStatusWordType  oFlashStatusWord;
    
        oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, (uint32 *)FLASHBANK0_VAR);
    
        while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
    
        if(oReturnCheck != Fapi_Status_Success)
        {
        }
    
        oFlashStatus = Fapi_getFsmStatus();
        if(oFlashStatus != 0)
        {
        }
    
        oReturnCheck = Fapi_doBlankCheck((uint32 *)FLASHBANK0_VAR, Sector8KB_u32length, &oFlashStatusWord);
    
        if(oReturnCheck != Fapi_Status_Success)
        {
        }
    
        return;
    }

    2. once flash loaded to RAM, check if bank0 section 2 has valid codes inside, then jump to it e.g. located 0x082000

    3. when firmware upgraded is needed, erase section 2 and above, copy new firmware into 0820000 and overwrite existing area ? 

    4. reboot, boot loader detected section 2 with codes inside, then jump to there, otherwise mean last firmware update failed, then start copy new firmware again.

    Danny

  • Hi Danny,

    Yes, and there exists a ROM build of the Flash API usage example that you can use as a reference as well.

    C:\ti\c2000\C2000Ware_5_02_00_00\driverlib\f28002x\examples\flash

    flashapi_ex1_programming project with the CPU1_FLASH_ROM_FLASHAPI build configuration.

    Also be sure to look at the linker command file used, 28002x_flash_api_rom_lnk.cmd .

    Thanks,

    Charles