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.

RTOS/CC2640: Flash API Library Download

Part Number: CC2640
Other Parts Discussed in Thread: CC2650,

Tool/software: TI-RTOS

I am currently developing standard JTAG programming for TI’s CC2640 device.

I am having difficulties finding the correct flash API document and examples. I have installed the TI RTOS driver library in Code Composer (Version 6.1.3). Though, I could see some example projects for CC2650 device type (I need CC2640 which I can change later in the project settings), I do not find any flash programming examples that I could use as base for my flash driver. Neither could I find a document describing the available functions in the Flash API.

In online forums, I see recommendations like writing our own flash drivers that calls driverlib functions like erase, program, etc. which I am aware of, as we already do support several C2000 devices using JTAG and TI’s Flash API (exactly what I am trying to do as well).

We would like to write our own flash bootloader that we can download to RAM and execute. For that, I am not sure whether I am downloading the correct libraries. I found the link below which I think is explaining the Flash API functions. I am able to find some of the files described in this link like Flash.c, Flash.h, etc. but not the library itself.

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/tirtos/2_14_01_20/exports/tirtos_full_2_14_01_20/products/cc26xxware_2_21_03_15980/doc/driverlib/group__flash__api.html

From the above link, I understand that TI RTOS is a flash driver from TI incorporating Flash API libraries. So, instead of downloading TI RTOS, I need to download Flash API library itself and then integrate it into our flash driver.

Could you let me know the exact procedure to download TI Flash API and integrate it into our own Flash driver? Do you have an example project including all necessary files for Flash API?

Thanks in advance,

Avinassh Bhavananthi.

  • Hi Avinassh,

    Did you see our example implementation of a serial bootloader? It's on gihub: github.com/.../ble_examples-2.2
  • Thanks for your feedback.
    Unfortunately, this example didn't help as for our customer, it is mandatory to use the JTAG interface.
    Also, we cannot use flash memory for downloading the bootloader as it is reserved for our cutomer use only. Hence, we need to be able to download our bootloader into RAM memory and execute from there.
    Could you help me find an example project using JTAG running from RAM?
  • Hi Avinassh,

    I don't understand your use-case. Why not use the ROM bootloader, or even an application like flash programmer to program the device?

  • Hi Marie,

    I cannot use the ROM bootloader as it is meant for programming a flash image into the device flash over either SPI or UART (taken from Serial Bootloader Interface Manual "swra466a.pdf").

    We are a company providing DLL based programming algorithms to our customer and in this matter, our customer mandatorily requires to program the flash device using standard JTAG protocol.

    As far as I have understood, the only procedure to program this device using standard JTAG is to use the Flash API and wrap it in an own flash bootloader.

    Or is there any other method?

    Thanks for your support.

  • Hi Avinassh,

    Yes you would have to implement your own flash bootloader.
  • Hi Marie,

    Now that you have confirmed about writing my own flash bootloader, I am reiterating the initial question again. How do I download the Flash API library and where do I find an example project using Flash API and running from RAM?

    In the past, we had developed support for JTAG programming of C2000 device families. At that time, we were able to download an basic ADC example project using Flash API and then develop our own function calls to erase/program, etc. But I am unable to find similar information for CC26xx implementation.

    Could you please confirm if the functions described in the below link are functions available in the CC26xx Flash API from TI. If so, is there an example project using this Flash API library and where do I download it?

    software-dl.ti.com/.../group__flash__api.html

    Thanks in advance,
    Avinassh.
  • Hi Avinassh,

    Are talking about storing the code in flash and running from RAM, or do you want to store it on RAM at all times (so you need RAM retention)?

    You will get all ti drivers if you download the CC2640R2 Software development Kit (SDK) here: 

    You can find documentation for CC26XX driverlib here: 

    dev.ti.com/.../

  • Hi Avinassh,

    Did you find a way to implement this?

    I will close this thread due to inactivity.
  • Hi Marie. H,

    No. I haven't been able to implement it yet. Yes. I would like to store our bootloader in RAM and execute from there all times but I would not need RAM retention. We only flash the customer application / bootloader onto the device flash memory. For this, we would like to download our own bootloader wrapper function (as there is no other way to program via JTAG). Everytime upon power-cycle or reset, we download our bootloader. So, we do not need RAM retention.

    I have downloaded the CC2640R2 SDK already but couldn't find the suitable example for my situation. I am hoping to find a library (along with header file) built with all the functions described in the group_flash_api for erase/program/init/... which I would be able to add to my wrapper function and call the flash functions. There is a similar thread explaining exactly what we would like to do (run bootloader from RAM to flash device).

    https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/556076#pi320995=1

    Also, in order to download our booloader to RAM and for initialization via JTAG, is there a emulation technical reference manual which I could have? In the past, we received similar information for C2000 family (see below thread).

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/535450?TMS320F2837xD-JTAG-initialization

     

    Thanks in advance,

    Avinassh.

  • Hi Avivnassh,

    For writing to flash I don't have anything else to give you than the driverlib documentation. (You could take a look at the NVS driver but I suspect it's not very well suited for your application). 

    You should be able to use the BIM project as a starting point for the bootloader. The linker file ontrols where the code recides, you should be able to edit it to store the BIM code in RAM.

    The Technical Reference Manula for cC2640R2F is here: http://www.ti.com/lit/swcu117