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/CC2650: CC2650 Launchpad UART flashing procedure?

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

Tool/software: TI-RTOS

Hi All,

I am working on CC2650 Launchpad board, i am able to flash the images through JTAG imterface with XDS110 Debuger and Uniflash tool support.
With this board is booting and working fine.

My Questions are:

1. How to Flash the images to CC2650 chip over UART interface

I gone through the CC2XX6 Bootloader interface document, ROM bootloader needs to be run for supporting the UART flash mode

2. How to set the CCA/CCFG to enable the backdoor for ROM bootloader execution.

I read the BL_CONFIG register i.e 0X0001FFD8 value is 0XC5FFFFFF

FD8 is 0xFF
FD9 is 0xFF
FDA is 0xFF
FDB is 0xC5

Help me to achive the flashing images over UART withouting using JTAG interface.

Thnaks and Regards,
Ravikiran

  • As figure 1 in www.ti.com/.../swra466a.pdf shows you have two options to enter the bootloader.

    The first is if a valid flash image is not preset.

    The second is if the bootloader backdoor is enabled.

    For the first option only:
    #define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5 // Enable ROM boot loader
    has to be set in the CCFG.

    For the second:
    You have to set the level:
    #define SET_CCFG_BL_CONFIG_BL_LEVEL 0x1 // Active high to open boot loader backdoor

    The value can also be 0x0.
    #define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER 0xFF // DIO number for boot loader backdoor

    Replace 0xFF with thepin you want to use.

    Enable the backdoor:
    #define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5 // Enabled boot loader backdoor
  • Hi Ter,

    Thanks for the reply.

    I erased the entire flash using Uniflash tool, under Setting and Utilities section-->Erase entire flash.
    After erasing i checked the board CCFG register value, it's still be the reset value 0XC5FFFFFF.


    1. Is it possible to flash image over UART using Uniflash tool? or SmartRF flash programmer 2 software is required ?

    2. How to congiure the CCFG rigster to enable ROM bootloader and BL_PIN, Level and Backdoor enable?

    3. Without JTAG-Debugger support, is it possible to Flash the images over UART interface in CC2650 Launchpad ?


    Thanks and Regards,
    Ravikiran
  • 1) My understanding is that Flash Programmer 2 is required.
    2) See my previous post.
    3) Should be, we have customers that don't have a JTAG interface on their board and therefore uses UART to flash the device.
  • Hello Ter,

    1. Ok i will try with the Flash Programmer 2 for loading images over UARThe (After complete Flash erase)
    2. Is it possible to enable the Configure the CCFG register manual using XDS debugger ?

    Thanks and Regards,
    Ravikiran
  • Why do you want to manipulate the CCFG through XDS instead of setting the wanted setting in the CCFG.c file?
  • Hello Ter,

    I tried the project simple_np for CC2650 Launchpad, under the "Startup" directory of project, "ccfg_app_ble.c" file is there, in that following code is present.

    ------------------------------------------------------------------------------------------------------------
    #ifdef SNP_SBL_ENABLE
    #include "board.h"

    #define SET_CCFG_BL_CONFIG_BOOTLOADER_ENABLE 0xC5 // Enable
    #define SET_CCFG_BL_CONFIG_BL_ENABLE 0xC5 // Enabled

    #define SET_CCFG_BL_CONFIG_BL_LEVEL 0x0 // Active low

    #if defined (CC2650DK_7ID) || \
    defined (CC2650_LAUNCHXL) || \
    defined (BOOSTXL_CC2650MA)
    #define SET_CCFG_BL_CONFIG_BL_PIN_NUMBER Board_MRDY // BL backdoor pin, Re-use MRDY
    #else
    #error "Board not recognized! must define CC2650DK_7ID, CC2650_LAUNCHXL or \
    BOOSTXL_CC2650MA."
    #endif //CC2650DK_7ID || CC2650_LAUNCHXL || BOOSTXL_CC2650MA
    #endif //SNP_SBL_ENABLE

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

    Board_MRDY value is 0x17 i.e decimal 23

    According to this code DIO23 pin for BL_PIN for enabling the ROM boot loader, with active low signal.

    After running simple_np project images, i read the CCFG register , value is 0XC5FE17C5 , this indicates the ROM boot loader is enabled with backdoor.

    DIO pin 23 is connected with GND to give active low signal.


    I tried to flashing the images over UART interface using SmartRF flash programmer 2, with the UART COM port, i got the following error in Flash programmer 2 tool.

    -------------------------------------------------------------------------------------------------------
    >Failed to read device ID during initial connect.
    >Connecting over serial bootloader failed: Failed to read device ID during initial connect.
    >Failed to create device object.
    >Initiate access to target: COM24.
    >ACK/NAK not received. Expected 0x00 0xCC or 0x00 0x33, received 0x10 0x9E.
    >Failed to read device ID during initial connect.
    >Connecting over serial bootloader failed: Failed to read device ID during initial connect.
    >Failed to create device object.
    ---------------------------------------------------------------------------------------------------------

    What could be the issue in Flash programmer 2 or in CC2650 PL board ?


    Thanks and Regards,
    Ravikiran
  • To check the basics first: Did you right click in SMartRF Studio and select "connect" before trying to program?
  • I tried connect before trying program, this also resulting same errors as previously mentioned.

    >Initiate access to target: COM24.

    >ACK/NAK not received. Expected 0x00 0xCC or 0x00 0x33, received 0x98 0x9E.

    >Failed to read device ID during initial connect.

    >Connecting over serial bootloader failed: Failed to read device ID during initial connect.

    >Failed to create device object.

  • The return code you get does not look like something that the device should give.

    Looking at your screenshot I notice something that looks incorrect. If I connect a Launchpad it looks like this:

    When I want to use UART I use the XDS class application... (UART through the USB connection) 

    What is the UART serial interface in your screenshot that you use? Do you have something else than your LP connected? 

  • Hello Ter,

    Yes that COM24 port is coming from Launchpad BLE CC2650 CHIP UART TX and RX connected with external USB to TTL (Serial Converter).
    In this case UART TX and RX connection removed between Debugger and BLE chip CC2650 ( UART TX and RX Jumper is removed ) to take to external USB to TTL converter.

    We are trying this above connection setup in CC2650 Launchpad to achieve same thing in our custom board.
  • Ok.

    In this case, would you be able to monitor the UART lines and see if the pattern given in the error message is actually send?

    Could you also test with the XDS110 UART as I wrote and don't use the USB to TTL just to test if this cases an issue or something else?
  • Hello Ter,]

    Thank you for your valuable suggestion.

    Just now i  tried UART connection with Debugger for UART Programming.

    I am able to connect with the target and able to flash the images over UART (Application/User UART port) in Flash programmer 2 )

    Check below screenshots for the same.

     

     

     

    Now Question is what could be wrong with the external USB-TTL converter connection for UART programming ?h 

    Is there any difference is there with Debugger UART connection and external USB-TTL converter UART connection ?

    is it possible to Program over UART without Debugger support ?

     

    Thanks and Regards,

    Ravikiran

     

  • One thing that could be a reason is definition of RX and TX pins. Are you sure that the correct pins are connected? (Is RX and TX swapped?)

    You should also measure the UART interface with the working solution and compare it with how it looks like when you use the USB to TTL.
  • Hello Ter,

    Connection is fine with external USB to TTL converter and CC2650 Launchpad BLE chip.( Connection is done by removing jumper connection between XDS debugger and  UART Lines of BLE chip in Launchpad).

    When CC2650 Launchpad  UART TX  and RX connected to external USB to TTL converter wrongly(Swapped TX and RX lines), i am getting always following error in Flash programmer 2.

    >Initiate access to target: COM24.

    >No response from device. Device may not be in bootloader mode. Reset device and try again.

    If problem persists, check connection and baud rate.

    >Connecting over serial bootloader failed: No response from device. Device may not be in bootloader mode. Reset device and try again.

    If problem persists, check connection and baud rate.

    >Failed to create device object.

    Where as in proper UART TX and RX connection with external converter properly i am getting following errors in Flash programmer 2.

    >Initiate access to target: COM24.

    >ACK/NAK not received. Expected 0x00 0xCC or 0x00 0x33, received 0x10 0x9E.

    >Failed to read device ID during initial connect.

    >Connecting over serial bootloader failed: Failed to read device ID during initial connect.

    >Failed to create device object.

    In proper UART connection with external converter is failing @ ACK phase.

    We are checking signals/initialization difference in  the XDS debugger and external converter connection with BLE chip, once testing is over i will update you with results.

    Thanks and Regards,

    Ravikiran

     

  • Do you use common ground when you connect the USB to TTL device?

    You write TTL which indicate different levels than CMOS?
  • Hello Ter,

    I observed that UART programming is driving with higher baud rate like 230400 value in SmartRF Flash programmer 2.
    Initially i used our custom USB to TTL converter for programming, some reason it's not supporting the higher baud rate communication like 230400 and above with BLE Chip.
    Because of this reason i was failing to connect and flash the images to the target board over UART in SmartRF Flash programmer 2 with external converter.

    Then, i tried UART Programming with some other standard USB to TTL converter connection with BLE chip, with this external converter i am able to connect and flash the images over UART to target with SmartRF Flash programmer 2 software.

    Our custom USB to TLL converter board is supporting lower baud rate like 9600 etc, and it is validated with BLE chip with UART echo application.
    So, Is it possible or how we can change the baud rate for UART COM port in SmartRF Flash programmer 2 software ?


    Thanks and Regards,
    Ravikiran
  • The UART rate is fixed in the code and can't be changed.
  • Hello Ter,

    Means, code that can't be changed  is here with respect to SmartRF Flash programmer 2 software, is my understanding is correct ?

    In the following document , mentioned about SBL boot loader application in windows, can be used for UART programming and baud rate can be changed for Flashing.

    www.ti.com/.../swra466a.pdf

    Only thing the application  needs to be rebuild with Visual studio C++ express, kindly share your thoughts on this. because our custom USB to TTL converter is not supporting higher baud rate.

    Thanks and Regards,

    Ravikiran

  • Yes, the baud rate can't be changed in the Flash Programmer software.

    And yes, if you need a different functionality you can use the provided libraries. The question is, why do you want to use a device with very low baud rate since it will take a fair amount of seconds to flash the device which in a lot of cases isn't practical.
  • Ok, the reason is, in our custom board USB to TTL converter is not working with higher baud rate, so we are looking for lower baud rate, yes with lower baud rate leads to more time consumption for Flashing over UART.

    We are working on USB to TTL converter change , mean while we are looking for lower baud rate supporting by Flash software.

    SBL script application requires rebuild with baud rate changes in Visual studio C++ right ?