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.

CC2340R5: Required to update the basic_ble_oad firmware over the UART using serial ROM bootloader

Part Number: CC2340R5
Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG

Tool/software:

Hello Experts, 

  1. Issue with Bootloader Mode after Firmware Update
    I am implementing firmware updates over UART using the serial bootloader for the CC2340R5. Initially, I used the data_stream project and utilized the Linux SBL tool to successfully update the firmware over UART. However, I encountered an issue:

    • During the first firmware update using the SBL tool, the CC2340R5 enters bootloader mode as expected based on the pin configuration I specified.
    • After the firmware update is completed, I am unable to place the CC2340R5 module back into bootloader mode using the same pin configuration.

    To help resolve this issue, I have attached:

    • A screenshot of the bootloader configuration I used.
    • The binaries generated for the SBL tool:
      • ccfg.bin mapped to memory range 0x4E020000 to 0x4E020800.
      • data_stream.bin exported from memory range 0x00000000 to 0x0007BFFF.

    Please assist me in identifying what might be causing this behavior and suggest steps to resolve it.


  1. Firmware Update for app_ble_oad Project via Serial ROM Bootloader
    I want to achieve a similar firmware update process for the app_ble_oad project, using the serial ROM bootloader to update the user application. My goal is as follows:

    • For the first update, I plan to flash the MCU boot, persistent, and user application images using Uniflash.
    • Subsequently, I want to update only the user application via the SBL tool, without needing to reflash the MCU boot and persistent images.

    Please guide me on the following:

    • What configurations should I set in SysConfig to trigger the MCU to enter bootloader mode?
    • What memory address ranges should I export to prepare the binary files for use with the Linux SBL tool?

  • Hello, 

    Thank you for reaching out. 

    Before answering your question may I kindly ask if you are considering implementing software updates both through BLE OAD and UART? This detail is important as, assuming you are only requiring software updates through UART, then you don't need the additional complexity of "OAD" projects. 

    To your question, I believe the first time the bootloader mode is accessed because the device's flash is blank, leading the device CCFG CRC to be considered as incorrect. Said differently, I am under the impression the back door pin never works. 

    To make sure we are heading in the right decision, can you confirm the approach you are following? 

    1. You short pin 21 with ground
    2. You press the reset button 

    Also, in order to double confirm the device enters/not enters the boot loader mode, I like to add a simple while loop blinking an LED at the very start of my application (the loop can of course be removed later on).

    I hope this will help,

    Best regards, 

  • Hi again, 

    Sorry I overlooked your second question. 

    The CC2340's ROM bootloader does not allow partial erase of the Flash (also, you cannot overwrite Flash without erasing it). For you use case, you then have two options: 

    - Option 1: erase and overwrite the totality of the Flash

    - Option 2: build your own flash bootloader exposing additional features

    I hope this will help,

    Best regards, 

  • Dear Clement,

    I hope this message finds you well.

    I am exploring the implementation of software updates using both BLE OAD and UART SBL. I would appreciate your guidance on the necessary configurations and steps to achieve this.

    Specifically, I would like clarification on the following points:

    1. What are the start and end memory addresses to export the firmware_image.bin and ccfg.bin files using Uniflash for the basic_ble_oad project?
    2. What configurations are required to invoke the Serial Bootloader (SBL)? Should the setup be similar to what I used in the data_stream project?
    3. Are there any additional considerations or steps I need to take into account to successfully implement firmware updates using OAD and SBL?

    Your assistance in addressing these queries would be invaluable.

    Thank you for your time and support.

  • Hi, 

    To your questions 

    What are the start and end memory addresses to export the firmware_image.bin and ccfg.bin files using Uniflash for the basic_ble_oad project?

    This will depend on the configuration you set. You can refer to the User's Guide for the Flash Layout of the OAD - https://software-dl.ti.com/simplelink/esd/simplelink_lowpower_f3_sdk/8.20.00.119/exports/docs/ble5stack/ble_user_guide/html/oad-mcuboot/flash-layout-on-chip-stack-library.html 

    What configurations are required to invoke the Serial Bootloader (SBL)? Should the setup be similar to what I used in the data_stream project?

    Yes, similar configuration of the bootloader should be required. 
    The only difference is that CCFG configuration (used to configure the SBL) is set by the MCUboot project. 

    Are there any additional considerations or steps I need to take into account to successfully implement firmware updates using OAD and SBL?

    Please refer to my previous answer:

    The CC2340's ROM bootloader does not allow partial erase of the Flash (also, you cannot overwrite Flash without erasing it). For you use case, you then have two options: 

    - Option 1: erase and overwrite the totality of the Flash

    - Option 2: build your own flash bootloader exposing additional features

    I hope this will help,

    Best regards, 

  • Hello

    Thank you for your response and guidance.

    I have successfully configured the system as per your recommendations and can now update the firmware over UART using the Linux SBL tool. However, I encountered an issue with the first-time firmware update process.

    Before utilizing the SBL to update the firmware, I need to program the OAD application along with the MCU Boot and Persistent applications using Uni-Flash. This allows the Serial ROM bootloader to be invoked via the configured pin, as previously set up in the MCU Boot project.

    Unfortunately, I am unable to invoke the bootloader on a blank device. Could you kindly provide guidance on how to perform the initial firmware update using the Serial ROM bootloader over UART?

    For reference, the device I am working with is the CC2340R52NORGER QFN24 (4x4, 512KB Flash).

    Looking forward to your advice.

    Best regards,

  • Hi, 

    Blank devices will always boot in the serial bootloader mode, using the default bootloader configuration. 

    The table below (taken from the device TRM, section 8.5.1.2 - https://www.ti.com/lit/pdf/swcu193) presents the default configuration for the device. For QFN24 package, the default configuration is serialIoCfgIndex = 0.

    I hope this will help,

    Best regards,

  • Hello, 

    I have only DIO12, DIO20, DIO22 and DIO13 exposed in my custom PCB for the UART. I don't have access for DIO6. Please specify if there is any command or way to change the serialloCfgIndex 0 to 1 while updating the firmware for first time using SBL. 

    Or if there any other way to use SBL for DFU update for the blank module using UART.

    Best Regards.

  • Hi, 

    Without access to DIO6, you won't be able to flash a blank 4x4 QFN CC2340R through its serial bootloader.

    If the SWD pins are available, you could consider using these to flash the device the first time. 

    I hope this will help,

    Best regards,