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-F28377S: F2837xS and F2807x Tools Support

Part Number: LAUNCHXL-F28377S

Hello! I'm trying to serial flash the F28377S  on the LAUNCHXL-F28377S using Uniflash GUI. Has serial flashing support been added to the F28377S? I don't see a serial option in Uniflash Connection Method drop-down. Thanks in advance.

Russell

  • Russell,

    UniFlash does not support Serial-flashing anymore.
    Please check this serial programming example appnote: www.ti.com/.../sprabv4b.pdf

    Thanks and regards,
    Vamsi
  • I am able to load the flash kernal, but loading the application results in a blank error. Do you have any advice? How can I debug the kernal-code with the emulator?


    Thanks,

    Russell


    Bit rate /s of transfer was: 6712.127930
    Application load successful!
    Done waiting for application to download and boot...
    SUCCESS of Command
    ERROR Status: BLANK_ERROR
    ERROR Address: 0x82000
  • Are you observing this error when trying to perform DFU or ERASE?

    You can connect the debugger to the device and also use Visual Studio to set breakpoints in the host application serial flash programmer. This way you can set breakpoints and single step and run both sides, host and device to get them to work together to debug further.

    Regards,
    sal
  • Hey guys,

    I have the same problem. I get an blank error when i perform dfu and earse command.

    Is there a solution.

    Thanks Alex

  • I was attempting a DFU. I know what debug means, i was asking how to put the launch pad into debug mode while still having it in sci boot mode The only connection i have to the launch pad is the mirco usb. Will this work as a channel for both jtag-debug as well as the serial line to send the the application to the flash kernal?  Please provide the dip switch positions as well as any emuboot registers required to run the launch pad in emulator/sci boot mode. It seems several people are having the exact same problem. Please confirm that this process is possible by replicating it on the hardware on your side.

    Russell

  • Please see the schematic here: C:\ti\c2000\C2000Ware_1_00_04_00\boards\LaunchPads\LAUNCHXL_F28379D\R2.0\launchxl-f28379d_r2.0_sch.pdf

    Regards,
    sal
  • I found this in c1_bootrom.h: #define EMULATE_TRUE_BOOT 0xFF // follow stand-alone boot with emulator connected.

    I have not found any documentation on this. Could you find out the process of using this? Dip pins and related registers

    Thanks,

    Russell
  • Hey guys,

    thanks for your answers, but i use my own hardware with the tms320f28377s.
    The communication with the Bootloader stays.
    I send an "ERASE_CPU1" command to the bootloader and then i get an Error with BLANK CHECK FAILS.
    I debugged the bootloader and I can see that after an successfull erase i get an blank check error.
    See the comment in the code below.
    The software Version is from C200Ware_1_00_04_00
    Flash API Version is F021 Flash API v1.55.


    void Shared_Erase(Uint32 sectors)
    {
    statusCode.status = NO_ERROR;
    statusCode.address = 0x12345678;
    int i = 0;
    Fapi_StatusType oReturnCheck;
    Fapi_FlashStatusWordType oFlashStatusWord;
    int fail = 0;

    EALLOW;
    for(i = 0; i < 14; i++)
    {
    if( (sectors & 0x00000001) == 0x00000001 )
    {
    oReturnCheck = Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector,
    (uint32 *)(sectAddress[i]));
    breakpoint************* oReturnCheck says Fapi_Status_Success ****************
    while (Fapi_checkFsmForReady() != Fapi_Status_FsmReady){}
    oReturnCheck = Fapi_doBlankCheck((uint32 *)(sectAddress[i]),
    breakpoint************* oReturnCheck says Fapi_Error_Fail ****************
    sectSize[i],
    &oFlashStatusWord);
    if(oReturnCheck != Fapi_Status_Success)
    {
    if(fail == 0) //first fail
    {
    statusCode.status = BLANK_ERROR;
    statusCode.address = oFlashStatusWord.au32StatusWord[0];
    }
    fail++;
    }

    while(Fapi_checkFsmForReady() == Fapi_Status_FsmBusy)
    {
    }
    }
    sectors = sectors >> 1;
    }
    EDIS;
    return;
    }

    Thanks Alex
  • Alex, Have you tired loading a program , a DFU?
  • Yes I tried to load a programm but i get the same error because the bootloader first erase and then programm to flash.
  • I mean...
    When you flash over DFU the bootloader first erase the flash.
    This is why i get the same error.
  • Alex,

    Please see if below helps:

    1) Could you search for "If the Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, xx) does not wait for the erase operation completion, how do we know whether the erase operation succeeded or not?" in the Flash API wiki at processors.wiki.ti.com/.../C2000_Flash_FAQ.

    2) Also search for "What are the common debug tips that we can consider when Flash API fails to erase or program?".  It may help debug.

    Thanks and regards,

    Vamsi

  • Hi,

    I read all the stuff and i think you have an bug in your bootloader code.

    the software i used is the latest C2000Ware_1_00_05_00.
    My CPU is TMS320F28377SPZPT (same CPU on F28377S Launchpad).
    Application Programm:
    C2000Ware_1_00_05_00/device_support/f2837xs/examples/cpu1/blinky/cpu01

    Build Configuration is CPU1_FLASH.
    Then we must convert to bootloader format ascii.
    hex2000 -boot -sci8 -a blinky_cpu01.out
    The output File is blinky_cpu01.a00

    The bootloader is:
    C2000Ware_1_00_05_00/device_support/f2837xs/examples/cpu1/F2837xS_sci_flash_kernel/cpu01.

    When i try to to download that file with DFU then i get an BLANK_ERROR

    open /dev/ttyO2,38400
    input and output successfully flushed
    kernel autoBaud successful
    Downloading led_gpio60.a00 to device...
    Checksum matches
    Blocksize : 26
    Address : 82000
    Blocksize : 2
    Address : 80000
    Blocksize : 114
    Address : 86000
    Blocksize : 3650
    Address : 8201c
    Blocksize : 448
    Address : 90000
    Blocksize : 0
    end

    Application load successful!
    Done waiting for application to download and boot... input and output successfully flushed
    SUCCESS of Command
    ERROR Status: BLANK_ERROR
    ERROR Address: 0x82000


    AFTER COMMENT THIS OUT IN THE BOOTLOADER IT WORKS

    void Init_Flash_Sectors(void)
    {
    EALLOW;
    Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
    Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;

    Fapi_StatusType oReturnCheck;
    oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, 150);
    if(oReturnCheck != Fapi_Status_Success)
    {
    Example_Error(oReturnCheck);
    }
    //oReturnCheck = Fapi_initializeAPI(F021_CPU0_W1_BASE_ADDRESS, 150);
    //if(oReturnCheck != Fapi_Status_Success)
    //{
    // Example_Error(oReturnCheck);
    //}
    oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
    if(oReturnCheck != Fapi_Status_Success)
    {
    Example_Error(oReturnCheck);
    }
    //oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank1);
    //if(oReturnCheck != Fapi_Status_Success)
    //{
    // Example_Error(oReturnCheck);
    //}
    Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
    Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
    EDIS;
    }


    BUT THIS SOLVED NOT MY PROBLEM !!!!!!!!!!!!!
    When i try to programm an larger application i get an VERIFY ERROR.

    In your Manual i found the following text but i see no bank switch in the booloader so
    that can only write bank0.

    On a Bank Change
    Whenever the target bank needs to be changed between Bank0 and Bank1, Fapi_initializeAPI() and
    Fapi_setActiveFlashBank() functions must be called again before any other API function (except
    Fapi_getLibraryInfo()) can be used. This procedure will update the API internal state variables and the
    corresponding FMC for the bank change.


    Can you please check this.

    Thanks Alex
  • Bravo! It works for me as well. Thanks Alex! Now help Alex with his Issue!

  • Alex, Rostislav,

    Great catch! Good debugging! I apologize the flash kernel for the single core F2837xS with dual banks is not so robust. It did not include this feature/enhancement. I have filed a bug to fix this.

    Could you both kindly post your solution here for us and for others? Please post code snippets of the code you changed to implement this fix.

    Thank you,
    sal

  • I get the same verify Error as alex when flashing my intended application.
  • You will need to switch the bank operating on using the flash API as well for verification.

    The two banks need to be managed for erase, program, and verify commands.

    Regards,
    sal
  • ello Sal Prezzino,

    here are my patch for your bootloader.

    I just remove the bank1 initial because we want write to bank0.

    It works for blinky programm, but when i try to download my program

    it dont works.

    I get an PROGRAMM ERROR:

    Downloading MyProgramm.a00 to device...

    ADRESSE: 82000  BLOCKSIZE: 1021

    ADRESSE: 80000  BLOCKSIZE: 2

    ADRESSE: 80002  BLOCKSIZE: 3235

    ADRESSE: 82400  BLOCKSIZE: 7168

    ADRESSE: 84000  BLOCKSIZE: 4298

    ADRESSE: 90000  BLOCKSIZE: 1418

    Application load successful!

    Done waiting for application to download and boot... input and output successfully flushed

    SUCCESS of Command

    ERROR Status: PROGRAM_ERROR

    ERROR Address: 0x07c88

    My linker file dont use bank1.

    Can you explain me why i must manage bank1.

    Or can you give me an fix for the bootloader to manage the banks.

    Alex

  • From c68b78dc57557a6ac2c9ef1b58c1f843194798c1 Mon Sep 17 00:00:00 2001
    From: alexn <aniebling@mibtec.de>
    Date: Mon, 16 Jul 2018 13:59:04 +0200
    Subject: dont initial bank1. now we dont get an blank error. blinky works.
    
    ---
     F2837xS_sci_flash_kernel.c | 26 +++++++++++++-------------
     1 file changed, 13 insertions(+), 13 deletions(-)
    
    diff --git a/F2837xS_sci_flash_kernel.c b/F2837xS_sci_flash_kernel.c
    index 31bc764..ec058d2 100644
    --- a/F2837xS_sci_flash_kernel.c
    +++ b/F2837xS_sci_flash_kernel.c
    @@ -129,7 +129,7 @@ uint32_t main(void)
         //
         // Initialize the Flash.
         //
    -    InitFlash_Bank1();
    +    //InitFlash_Bank1();
         InitFlash_Bank0();
         Init_Flash_Sectors();
     
    @@ -157,7 +157,7 @@ void Init_Flash_Sectors(void)
     {
         EALLOW;
         Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
    -    Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
    +    //Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0x0;
     
         Fapi_StatusType oReturnCheck;
         oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, 150);
    @@ -165,25 +165,25 @@ void Init_Flash_Sectors(void)
         {
             Example_Error(oReturnCheck);
         }
    -    oReturnCheck = Fapi_initializeAPI(F021_CPU0_W1_BASE_ADDRESS, 150);
    -    if(oReturnCheck != Fapi_Status_Success)
    -    {
    -        Example_Error(oReturnCheck);
    -    }
    +    //oReturnCheck = Fapi_initializeAPI(F021_CPU0_W1_BASE_ADDRESS, 150);
    +    //if(oReturnCheck != Fapi_Status_Success)
    +    //{
    +    //    Example_Error(oReturnCheck);
    +    //}
     
         oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);
         if(oReturnCheck != Fapi_Status_Success)
         {
             Example_Error(oReturnCheck);
         }
    -    oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank1);
    -    if(oReturnCheck != Fapi_Status_Success)
    -    {
    -        Example_Error(oReturnCheck);
    -    }
    +    //oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank1);
    +    //if(oReturnCheck != Fapi_Status_Success)
    +    //{
    +    //    Example_Error(oReturnCheck);
    +    //}
     
         Flash0EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
    -    Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
    +    //Flash1EccRegs.ECC_ENABLE.bit.ENABLE = 0xA;
         EDIS;
     }
     
    -- 
    cgit v0.11.0
    
    

  • Alex,

    If you don't want to erase/program/verify Bank1, then you don't need to call Fapi_initializeAPI() and Fapi_setActiveFlashBank() for Bank1.  If you are not using Bank1 in your linker command file to allocate any code/data to it, then I agree that you don't need to initialize it's read interface as well - meaning, you don't need to call InitFlash() for Bank1.  

    A) Can you check whether the Flash pump semaphore is allocated for FMC0 or not, when Flash program operation is failing for Bank0?

    B) What is the exact error that you get from program function call? 

    C) Did you check FMSTAT after the failure? If yes, what is the value of FMSTAT - that would help us debug further.

    Thanks and regards,

    Vamsi

    -------------------------------------------------------------------------------------------------------------------------

    P.S: Below content is just for FYI (looks like you already know this stuff) - but just in case.

    1) When application wants to perform Bank0 erase/program/verify operations, below functions should be called to initialize FMC0 and Bank0 (please note that parameters are related to Bank0/FMC0).

       //

       //Give pump ownership to FMC0

       //

       PUMPREQUEST = 0x5A5A0002;

       //

       // This function is required to initialize the Flash API based on System

       // frequency before any other Flash API operation can be performed on Bank0.

       // Note that the FMC0 register base address is passed as the parameter

       //

       oReturnCheck = Fapi_initializeAPI(F021_CPU0_W0_BASE_ADDRESS, Freq);

       if(oReturnCheck != Fapi_Status_Success)

       {

           //

           // Check Flash API documentation for possible errors

           //

           Example_Error(oReturnCheck);

       }

       //

       // Fapi_setActiveFlashBank function sets the Flash bank0 and FMC0 for

       // further Flash operations to be performed on Bank0.

       // Note that the parameter passed is Fapi_FlashBank0 since FMC0 register

       // base address is passed to Fapi_initializeAPI()

       //

       oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank0);

       if(oReturnCheck != Fapi_Status_Success)

       {

           //

           // Check Flash API documentation for possible errors

           //

           Example_Error(oReturnCheck);

       }

    2) When application wants to perform Bank1 erase/program/verify operations, below functions should be called to initialize FMC1 and Bank1 (please note that parameters are related to Bank1/FMC1).

       //

       // Give pump ownership to FMC1

       //

       PUMPREQUEST = 0x5A5A0001;

       //

       // This function is required to initialize the Flash API based on System

       // frequency before any other Flash API operation can be performed on Bank1.

       // Note that the FMC1 register base address is passed as the parameter

       //

       oReturnCheck = Fapi_initializeAPI(F021_CPU0_W1_BASE_ADDRESS, Freq);

       if(oReturnCheck != Fapi_Status_Success)

       {

           //

           // Check Flash API documentation for possible errors

           //

           Example_Error(oReturnCheck);

       }

       //

       // Fapi_setActiveFlashBank function sets the Flash bank1 and FMC1 for

       // further Flash operations to be performed on the bank1.

       // Note that the parameter passed is Fapi_FlashBank1 since FMC1 register

       // base address is passed to Fapi_initializeAPI()

       //

       oReturnCheck = Fapi_setActiveFlashBank(Fapi_FlashBank1);

       if(oReturnCheck != Fapi_Status_Success)

       {

           //

           // Check Flash API documentation for possible errors

           //

           Example_Error(oReturnCheck);

       }

     

    3) Please note: Since there are two FMCs for a single core in F28377S, above functions must be called whenever the target bank is changed.  Only one of the bank can be active for erase/program/verify operations.  Hence, whenever the application wants to switch the target bank for Flash operations, above functions for respective bank should be called before performing Flash operations on that bank.  Note that Flash wait-states should be configured before calling these functions.

    4) Coming to Flash read interface configuration: You might have noticed the functions InitFlash_Bank0() and InitFlash_Bank1() - these can be used to initialize Bank0 and Bank1 respectively (wait-states can be changed based on your application frequency).  These should be called before using any Flash API functions.  And both of them can be executed irrespective of which bank you are targeting for erase/program/verify.

    //
    // Call Flash Initialization to setup flash waitstates, fallback power mode, ECC etc.
    // This function must reside in RAM
    //
    InitFlash_Bank0();
    InitFlash_Bank1();

     

  • Alex,

    Could you update on the status of your debug?

    Thanks and regards,
    Vamsi

  • Is TI not debugging the flash-kernal for the F2837xS?? We were told that a fix was in the works. Is that still the case?
  • Russell,

    Thank you.  Please note that we took it in to our bug-fix queue.  Our team will work to release it in next quarter.

    Thanks and regards,

    Vamsi

  • An update should be coming out next C2000Ware release.

    Regards,
    sal
  • Hi,

    when will the next update come and is there the bug eliminated.

    thanks Alex
  • Hi Alex,

    Unfortunately this fix got pushed back. We do not have a date for this bug fix to be released as of now. We apologize for the inconvenience.

    sal
  • Hi guys,

    have nobody fixed it already ??.

    Alex
  • There is no fix for this yet released.

    Regards,
    sal