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.

CCS/LAUNCHXL-CC2650: UART does not work after write flash

Part Number: LAUNCHXL-CC2650
Other Parts Discussed in Thread: CC2650

Tool/software: Code Composer Studio

Hi Ti Team:

we init the UART as callback mode :115200/8/N/1.it send a 64 bytes pakect evey 8ms and receive 12 bytes after the Tx finished.

it works well before i write a frame  to the flash(we need stored 64Bytes data to the flash @ 0x1A000 after get a special Cmd)

after write a byte to the flash,the uart send nothing out even the UART_write(uart_handle,TxBuffer,64) was called every 8ms and and we find the "BUSY" bit of the FR register was SET and can't go into the ReadCallBack and the WriteCallBack anymore.

how can i do to prevent that?

Thanks

LN

  • Hi Nan,

    Can you elaborate on how you write to flash in your application and how this looks in code? 

  • Hi,

    thanks for your help,please refer to the code:

    bool flash_write(char *source,uint32_t address, uint16_t size)
    {
       if(NOROM_FlashSectorErase(address) == FAPI_STATUS_SUCCESS)
       {
           if(NOROM_FlashProgram(source,address,size)) == FAPI_STATUS_SUCCESS)
           {
             return ture;
           }
           return false;
       }
       return false;
    }
    #define PARA_ADDRESS  0x1A000
    
    bool parameter_store()
    {
      if(cmd == STORE_PARA)
      {
        return (flash_write((char *)&parameter,PARA_ADDRESS, 256));
      }
      return ture;
    }




    Once run into flash_write, the UART FR “BUSY” will be set, and can't be cleared unless re-init the UART.

    Thanks!
    LN
  • Hi Nan,

    I would advice you to use the official NVS driver provided by TI. It takes a few more things into consideration such as disabling/enabling the flash cahce when programming. 

  • Hi M-W,

    what i used is the "official" with the SDK 2_21_00_06.

    Maybe you will ask me why not use the lastest SDK, because TI update the SDK too frequently and aways change or delete some API in newer SDK.

    if we update the SDK follow TI, we aways need change the code every time.

    Thanks,

    LN

  • Hi Nan,

    When I say official NVS driver i refer to the actual high-level drivers provided from TI to be use in a TI-RTOS settings. What you are doing is off course "official TI APIs" but we do not consider DriverLib APIs drivers as it is a simple HAL provided for convince.

    The NVS driver is found in "C:\ti\tirtos_cc13xx_cc26xx_2_21_00_06\products\tidrivers_cc13xx_cc26xx_2_21_00_04\packages\ti\drivers", I recommend you at least have a look into it to see what it does differently from you (it will be using the DriverLib APIs).

    As for updating the SDK, there is really only one update for the CC2650 and that would be the "tirtos_cc13xx_cc26xx_2_21_00_06" version as the CC2650 is not covered by the newer SimpleLink SDK.

    While we really try to avoid breaking compatibility with API changes, this is sometimes necessary for the greater good of the SDK. The quarterly releases (4 times a year) is a way to provide steady and reliable drop points for new features as well as critical bug fixes