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.

CC1312R: CC1312 with bootloader mode.

Expert 1085 points
Part Number: CC1312R
Other Parts Discussed in Thread: UNIFLASH,

Tool/software:

Hi TI experts.

I use DIO9 as a bootloader on CC1312.
And use Uniflash to do fw upgrade.
But an error will occur after about 80% of updates.

the error log as below.

[2025/4/15 下午1:47:42] [INFO] Cortex_M3_0: CC1312R1F3(Bootloader)
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Auto baud detection is successful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Ping command is successfully received by target!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0x0 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0x2000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0x4000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0x6000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0x8000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0xA000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0xC000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erase sector on address :0xE000 is succesful!
[2025/4/15 下午1:47:43] [INFO] Cortex_M3_0: Erasing memory time elapsed: 0.1358s
[2025/4/15 下午1:48:03] [ERROR] Cortex_M3_0: [ERROR_MESSAGE]Send command to address: 0xE000 with programming size : 0x26C4 is failed! Status: [ERROR_MESSAGE]Failing erasing or programming operation!
[2025/4/15 下午1:48:03] [ERROR] Cortex_M3_0: [ERROR_MESSAGE]Programming is failed!
[2025/4/15 下午1:48:03] [ERROR] Cortex_M3_0: [ERROR_MESSAGE]Process is failed!

how can I solve the problem?

Thanks.

  • HI Weli,

    please help me understand the following:

    • You are using CC1312R with custom hardware.
    • How do you connect the custom hardware to a debugger?
    • Which debugger and chip to you select when opening Uniflash?

    I use DIO9 as a bootloader on CC1312.

    Do you mean with this that you want to use the bootloader backdoor?

    Please see the TRM on how it should be used: https://www.ti.com/lit/swcu185g 


    Please see the explanation of the interface and an example software to flash the chip using it here: https://www.ti.com/lit/an/swra466d/swra466d.pdf

    Kind regards,
    Theo

  • Hi Sir,
    Thank you for your quick response.'
    1. I use custom hardware, which is a module. As shown in the photo, I connected DIO2, DIO3, VCC, GND to USB to UART

    I set DIO9 as the bootloader backdoor DIO. I kept it at GND, and then I reset the Module to put it into bootloader mode.


    2. Before burning this firmware, I used XDS to burn the firmware first, and turned on the bootloader in syscfg, as shown below.


    3. At the same time, I tried to send 0x55 via UART, and it sent back data, which means I successfully entered the bootloader, but I encountered a situation where it would display fail when the update was halfway through.

    also, i choice below devices.

  • Hi Weli,

    thank you for all the details.

    Your setup looks all good and also the bootloader backdoor is activated correctly.

    When I look at the Uniflash error I see that erasing the chip worked fine (also showing that the chip really is functional in bootloader mode) but that the flash operation isn't even started.

    Could you please try to download the example software from this app note: https://www.ti.com/lit/an/swra466d/swra466d.pdf and test if you can with this flash the device?

    Kind regards,
    Theo

  • Hi Theo.

    i tried sblAppEx_1_04_00_00 and downloaded Blinkky example, everything is ok.

    The result is as below:

    but when I using sblAppEx to download my own hex,

    it will show Flash download: Byte count must be a multiple of 4.

    The detailed error message is as follows:

    D:\BJJA\CloudStation\Project\R\R37_CC1312_ATcommand\SCM\swra466e\sblAppEx_1_04_00_00\bin>sblAppEx.exe 48 3 R37_CC1312_AT_command_prop_rf.hex
    
    Connecting (COM48 @ 230400 baud) ...
    100% (477.00ms)
    Erasing flash ...
    100% (365.00ms)
    Writing flash ...
    Flash download: Byte count must be a multiple of 4
    
    
    An error occurred: 2
    D:\BJJA\CloudStation\Project\R\R37_CC1312_ATcommand\SCM\swra466e\sblAppEx_1_04_00_00\bin>
    

    Could you give me some suggestions?