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/CC2640R2F: Halt In Boot (HIB) issue upon subsequent soft reset after JTAG flashing

Part Number: CC2640R2F

Tool/software: TI-RTOS

Hi TI,

Device

CC2640R2LAUNCHXL

SDK

simplelink_cc2640r2_sdk_2_40_00_32

IDE

IAR8.20.2

Reference Project

Multirole

 

We have custom FOTA process in our application. FOTA image will be stored in external flash. After completion, we are verifying the downloaded image and doing soft reset HAL_SYSTEM_RESET();

 

We have seen the halt in bootloader issues with below steps.

  1. Flashing from JTAG.
  2. No power reset to the board.
  3. Download FOTA image.
  4. Upon completion of download Call HAL_SYSTEM_RESET();
  5. Jumps to boot loader to update the software in internal flash.
  6. But halts in boot loader and will not update the flash/firmware.

But if we do the power reset after the flash it boots up properly.

What could be the issue?

Thanks

Niranjan Hegde

  • Hi Niranjan,

    The issue is that when the device has been connected to with JTAG, the debugger subsystem is turned on and is told to enable "Halt in Boot". The reason for this feature is that you don't want the device to start running willy nilly while you are debugging.

    It is possible for the JTAG emulator to disconnect cleanly, but often this is not the case. For this reason your safest bet is to perform an external reset after programming the device via JTAG. Smart RF Flash Programmer should be able to do a reset when called from the command line "srfprog --reset pin <rest of the options>"

    On the device itself, it is possible to detect that this is enabled and to perform an alternative reset method that properly resets the device.

    See http://dev.ti.com/tirex/content/simplelink_cc2640r2_sdk_1_40_00_45/docs/tidrivers/doxygen/html/_power_c_c26_x_x_8h.html#acaed4f189f650d485596cd173016ca1b for some explanation

    If you consider the source code behind the feature described in the above link, you should be able to do the following yourself:

    uint32_t debugOn = HWREG(AON_WUC_BASE + AON_WUC_O_PWRSTAT) & AON_WUC_PWRSTAT_JTAG_PD_ON);
    if (debugOn) Power_shutdown(NULL, NULL);
    else normalResetFunction();
    

    Best regards,
    Aslak