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.

LAUNCHXL-CC2640R2: Trouble debugging example app

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2F, , UNIFLASH, CC2640

Hi Team,

 I am having trouble debugging the CC2640R2F LAUNCHPAD eval board.I am able to build and flash code, but whenever I try to run the code in Debug mode it crashes and gets stuck in a while() loop. The example app in question is ble5_host_test_cc2640r2lp_app.

 

There was little success debugging ble5_project_zero_cc2640r2lp_app, but not the app formally mentioned

Any insight is greatly appreciated.

Best regards,

Alexis

  • Hi Alexis,

    What SDK are you using?

  • Hi Joakim,

    I am using cc2640r2_sdk_3_20_00_21. 

    Thanks for the help and please let me know if more information is required.

    Best regards, 

    Alexis

  • Hi Alexis,

    I wasn't able to reproduce the issue. Which version of CCS are you using? Have you made any modifications in the files? 

    Thanks,
    Elin

  • Hi Elin, 

    Thanks for the help and following up on your questions.

    Have you tried downloading the newest version of CCS?

    Currently using CCS v.9 which I believe is the newest version available

    Which revision of the chip is being used?

    They have hardware rev.1 for the LAUNCHXL-CC2640R2

    How many projects from the SDK have been tried to debug? 

    ble5_host_test_cc2640r2lp_app and ble5_project_zero_cc2640r2lp_app

    Can they use other TI products, e.g. SmartRF Studio 7, Flash Programmer 2, or UniFlash? 

    They currently have not tried using these tools, is this something to look at?

    Which while() loop do you get stuck in? Is it in the exceptionHandler() function?

    At times when it gets stuck at a while loop it is in the Icall_abort function, please see below for more details on this scenerio.

    A similar configuration is attempted such as in this link to our  TI Resource explorer.

    They have one board running host test and another board running project zero. Everything seems to work when not trying to debug.

    When the debugger is on and then btool is initiated to run , then two outcomes occur. It either gets stuck in the Icall_abort function or it gives a GAP Device Timeout popup with the following errors.

    Cortex_M3_0: Error: (Error -1170 @ 0x0) Unable to access the DAP.

    Cortex_M3_0: Trouble Halting Target CPU: (Error -2064 @ 0x0) .

    These errors occur when debugging step by step as well as just a break point with it not getting to the break point. 

    Have currently looked at the Debugging JTAG information we have available pertaining to troubleshooting but has yet to helped solve the unexpected behavior.

    Please let me know if you have any insight on what may be the cause or if more information is needed

    Best regards,

    Alexis

  • Hi Alexis, 

    Alexis Magana Lemus said:
    Currently using CCS v.9 which I believe is the newest version available

    Yes, version 9.1.0 is the newest version of CCS. 

    Alexis Magana Lemus said:
    They currently have not tried using these tools, is this something to look at?

    If you hadn't seen the expected behavior when you aren't in debug mode, I'd recommend you to try to program the device using e.g. Flash Programmer 2. 

    Alexis Magana Lemus said:
    When the debugger is on and then btool is initiated to run , then two outcomes occur. It either gets stuck in the Icall_abort function or it gives a GAP Device Timeout popup with the following errors.

    I've been able to reproduce the issue using but the issue was solved by restarting BTool. Are you getting the errors in CCS and BTool simultaneously? 

    Thanks, 
    Elin

  • Hi Elin,

    The workaround unfortunately did not solve the issue.  Restarting Btool still fails on my end.

    The device gets programmed through the XDS110 when I start debugging.

     

    In the case where I end up in the Icall_abort() while loop, I do not get CCS errors but

    BTool times out on the device reset.  In the case where I get the DAP errors, I get the

    CCS errors first, then BTool timeouts.

     

    Best regards,

    Alexis

  • Hi Alexis,

    Which steps are you performing in BTools to produce this error? Can you share a snippet of the result and error messages you get in BTools? 

    Alexis Magana Lemus said:

    In the case where I end up in the Icall_abort() while loop, I do not get CCS errors but

    BTool times out on the device reset.  In the case where I get the DAP errors, I get the

    CCS errors first, then BTool timeouts.

    Do you perform the same steps to get these two different cases? Which are the steps?

    Did you follow this guide to assign specific LPs to projects? 

    Thanks,
    Elin

  • Hi Alexis, 

    Thanks for the log files in the email. 

    I can see that you are debugging host_test and I am assuming that you are trying to use BTool at the same time. Is there a reason for debugging host_test? I thought you were debugging project_zero while using the host_test LP in BTools. Since both BTools and debugging in CCS are using the same serial interface to communicate with the device, it is not that strange that you are seeing error messages.

    If you try the setup I mentioned above, do you see any error messages?

    Thanks, 
    Elin

  • Hi Elin,

    With the setup mentioned, I was able to successfully run BTool with ble5_host_test running out of ROM and ble5_project_zero running in debug. However the main objective is being able to debug the host side due to being more important to the functionality that is trying to be implemented.

    Are there any suggestions on debugging host_test?

    Hooked up the CC2640 UART to a separate serial port than the one being used to debug ble5_host_test but got the same behavior as before.

    Thanks for the help,

    Best regards,

    Alexis

  • Hi Elin,

    Following up with some more information on reason for debugging host_test and run BTool. The planned implementation is to use another device to perform a subset of Btool is doing so any tips on how to correctly debug host_test and run Btool would be greatly appreciated.

    Thank you and best regards,

    Alexis

  • Hi Alexis, 

    I'm working on the issue but so far I haven't been able debug and use BTool at the same time. Will keep you updated.

    Thanks,
    Elin

  • Hi Alexis, 

    If you follow the steps below you should be able to run BTools and debug host_test at the same time. 

    1. Start a debug session in CCS
    2. Terminate the session and press the reset button on the LP
    3. Start BTool using Run_BTool.bat and select the correct serial port settings
    4. In CCS, open Target Configurations and select "Launch Selected Configuration"

    5. Right-click and select "Connect Target"

    6. Press Play
    7. In BTool, enter "Advanced Commands" and send a GAP_DeviceInit command

    You should now be able to both debug and use BTool. 

    Thanks,
    Elin

  • Elin,

    I am the original submitter of this issue.  I tried to follow your workaround without success.

    I do not see the "Launch selected configuration" option when I right-click on the .ccxml file?

    Are you using CCS 9.1?  Other differences...my .ccxml file shows (Active) next to it and

    my top level app has "RTSC" on the folder icon whereas yours has "C"?

    Following your workaround, my debugger no longer crashes, but BTool still does not function

    the way it should (the it does when not debugging).  I am suspecting there should be different

    build configuration for debug vs release builds.

    FYI...we prefer to work with IAR.  So if you have that available, please use it to investigate?

    Frustrated!  I am at a standstill trying to evaluate the TI solution.  I am spinning my wheels and wasting

    a lot of time when I expected the examples to just work and get me up and running.  Soon I will have to

    abandon the TI option and move on to competitor options in the interest of making progress on my project.

    I have nothing to show for the weeks I have spent trying to get TI to work!  Boss is getting anxious to see

    something work!

    Please help if you can?

  • Hi Robert, 

    Yes, I am using CCS v9.1 but you have to open Target Configurations in order to see "Launch Selected Configuration" when you right-click on the .ccxml file. Did you send a GAP_DeviceInit command? If I don't, it doesn't work but if I do BTools works. 

    I haven't used IAR at all but I'm guessing that there is a similar solution. I'll try and find a solution for IAR tomorrow because I'm out traveling today.

    I completely understand your frustration, it is not easy when you expect to be up and running right away and it takes weeks to see progress. A big part of the problem is that host_test is usually only in BTools to establish a connection to another LaunchPad and see which commands are sent and/or send commands to the other LaunchPad.

    Can you try and follow the steps again and see if it works in CCS and BTools? It is important that you follow the steps exactly and do all the "small" stuff like launching the configuration from the Target Configurations window. You can open it from View -> Target Configurations.

    Thanks,
    Elin

  • Elin,

    Still cannot get it to work in CCS!  Plus this just seems like a workaround not a fix?

    DeviceInit doesn't get me much. I attached a BTool log file of what it SHOULD look like when

    you click "New Device" in BTool with host_test running out of ROM/Flash.

    After debugging on my own, I really think there is some kind of memory corruption or stack

    issue going on in debug.  If I just run the app (in IAR) and then hit pause the stack pointer is already

    outside it's valid range!

     

    ----------------------------------------------------
    - Log Start Marker                                 -
    ----------------------------------------------------
    
    [09/09/2019 08:24:21.820] <Info   > BTool - Bluetooth Low Energy Application - v1.42.16 (BLE5) {LoggingUtils}
    [09/09/2019 08:24:25.161] <Debug  > Starting Thread {RspDataInThread}
    [09/09/2019 08:24:25.171] <Debug  > Starting Thread {TxDataOutThread}
    [09/09/2019 08:24:25.173] <Debug  > Starting Thread {RxDataInThread}
    [09/09/2019 08:24:25.176] <Debug  > Starting Thread {RxTxMgrThread}
    [09/09/2019 08:24:26.319] <Info   > [1] : <Info> - 08:24:26.318
    Port opened at 9/9/2019 8:24:26 AM
    --------------------------------------------------------------------
    [09/09/2019 08:24:26.357] <Debug  > Starting Thread {ProcessRxProc}
    [09/09/2019 08:24:26.544] <Info   > [2] : <Tx> - 08:24:26.449
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    [09/09/2019 08:24:26.553] <Info   > Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [09/09/2019 08:24:26.620] <Info   > [3] : <Rx> - 08:24:26.585
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x05 (5) bytes(s)
     Event          : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
     Status         : 0x00 (0) (SUCCESS)
     CmdOpCode      : 0xFC1D (HCIExt_ResetSystemCmd)
    [09/09/2019 08:24:26.628] <Info   > Dump(Rx):
    0000:04 FF 05 1D 04 00 1D FC                         ........
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.245] <Info   > [4] : <Tx> - 08:24:27.135
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x08 (8) byte(s)
     ProfileRole    : 0x08 (8) (
                      Central)
     AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
     RandomAddr     : 00:00:00:00:00:00
    [09/09/2019 08:24:27.255] <Info   > Dump(Tx):
    0000:01 00 FE 08 08 00 00 00 00 00 00 00             ............
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.285] <Info   > [5] : <Rx> - 08:24:27.272
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE00 (GAP_DeviceInit)
     DataLength     : 0x00 (0)
    [09/09/2019 08:24:27.289] <Info   > Dump(Rx):
    0000:04 FF 06 7F 06 00 00 FE 00                      .........
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.324] <Info   > [6] : <Rx> - 08:24:27.284
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x2C (44) bytes(s)
     Event          : 0x0600 (1536) (GAP_DeviceInitDone)
     Status         : 0x00 (0) (SUCCESS)
     DevAddr        : 54:6C:0E:83:39:B5
     DataPktLen     : 0x00FF (255)
     NumDataPkts    : 0x05 (5)
     IRK            : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     CSRK           : 26:A2:1E:49:EC:A6:FC:75:D4:3E:A9:21:56:54:4F:1F
    [09/09/2019 08:24:27.328] <Info   > Dump(Rx):
    0000:04 FF 2C 00 06 00 B5 39 83 0E 6C 54 FF 00 05 00 ..,....9..lT....
    0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 26 ...............&
    0020:A2 1E 49 EC A6 FC 75 D4 3E A9 21 56 54 4F 1F    ..I...u.>.!VTO.
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.345] <Info   > [7] : <Tx> - 08:24:27.320
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x02 (2) (INIT_PHYPARAM_CONN_INT_MIN)
    [09/09/2019 08:24:27.349] <Info   > Dump(Tx):
    0000:01 61 FE 02 01 02                               .a....
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.365] <Info   > [8] : <Tx> - 08:24:27.331
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x03 (3) (INIT_PHYPARAM_CONN_INT_MAX)
    [09/09/2019 08:24:27.370] <Info   > Dump(Tx):
    0000:01 61 FE 02 01 03                               .a....
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.384] <Info   > [9] : <Tx> - 08:24:27.342
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x04 (4) (INIT_PHYPARAM_CONN_LATENCY)
    [09/09/2019 08:24:27.388] <Info   > Dump(Tx):
    0000:01 61 FE 02 01 04                               .a....
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.403] <Info   > [10] : <Tx> - 08:24:27.353
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x05 (5) (INIT_PHYPARAM_SUP_TIMEOUT)
    [09/09/2019 08:24:27.407] <Info   > Dump(Tx):
    0000:01 61 FE 02 01 05                               .a....
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.429] <Debug  > Unload 8 Bits Failed -> Not Enough Source Data Bytes For Unload {DataUtils}
    [09/09/2019 08:24:27.434] <Info   > [11] : <Rx> - 08:24:27.360
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x02 (2) (INIT_PHYPARAM_CONN_INT_MIN)
     MinConnectInter: 0x0050 (80)
    [09/09/2019 08:24:27.438] <Info   > Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 02 50 00             ......a...P.
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.452] <Debug  > Unload 8 Bits Failed -> Not Enough Source Data Bytes For Unload {DataUtils}
    [09/09/2019 08:24:27.457] <Info   > [12] : <Rx> - 08:24:27.382
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x03 (3) (INIT_PHYPARAM_CONN_INT_MAX)
     MaxConnectInter: 0x0050 (80)
    [09/09/2019 08:24:27.461] <Info   > Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 03 50 00             ......a...P.
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.474] <Debug  > Unload 8 Bits Failed -> Not Enough Source Data Bytes For Unload {DataUtils}
    [09/09/2019 08:24:27.479] <Info   > [13] : <Rx> - 08:24:27.404
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x04 (4) (INIT_PHYPARAM_CONN_LATENCY)
     ConnectLatency : 0x0000 (0)
    [09/09/2019 08:24:27.483] <Info   > Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 04 00 00             ......a.....
    --------------------------------------------------------------------
    [09/09/2019 08:24:27.496] <Debug  > Unload 8 Bits Failed -> Not Enough Source Data Bytes For Unload {DataUtils}
    [09/09/2019 08:24:27.500] <Info   > [14] : <Rx> - 08:24:27.415
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x05 (5) (INIT_PHYPARAM_SUP_TIMEOUT)
     SuperTimeout   : 0x07D0 (2000)
    [09/09/2019 08:24:27.504] <Info   > Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 05 D0 07             ......a.....
    --------------------------------------------------------------------
    [09/09/2019 08:24:52.837] <Debug  > Resuming Thread {RxDataInThread}
    [09/09/2019 08:24:52.840] <Debug  > Resuming Thread {RxTxMgrThread}
    [09/09/2019 08:24:52.842] <Debug  > Resuming Thread {TxDataOutThread}
    [09/09/2019 08:24:52.845] <Debug  > Resuming Thread {RspDataInThread}
    [09/09/2019 08:24:52.847] <Debug  > Pausing Thread {RxDataInThread}
    [09/09/2019 08:24:52.850] <Debug  > Pausing Thread {RxTxMgrThread}
    [09/09/2019 08:24:52.852] <Debug  > Pausing Thread {TxDataOutThread}
    [09/09/2019 08:24:52.854] <Debug  > Exiting Thread {ProcessRxProc}
    [09/09/2019 08:24:52.856] <Debug  > Pausing Thread {RspDataInThread}
    [09/09/2019 08:24:52.955] <Debug  > Exiting Thread {RspDataInThread}
    [09/09/2019 08:24:53.056] <Debug  > Exiting Thread {TxDataOutThread}
    [09/09/2019 08:24:53.157] <Debug  > Exiting Thread {RxDataInThread}
    [09/09/2019 08:24:53.257] <Debug  > Exiting Thread {RxTxMgrThread}
    
    ----------------------------------------------------
    - Log Start Marker                                 -
    ----------------------------------------------------
    
    [09/17/2019 07:31:02.996] <Info   > BTool - Bluetooth Low Energy Application - v1.42.16 (BLE5) {LoggingUtils}
    

  • Hi Robert, 

    To my knowledge, this hasn't been tested before since this is not the intended use of host_test and BTool.

    Can you provide me with the BTool log you are getting when you don't get it to work? 

    Thanks,
    Elin

  • Elin,

    Attached log of bad case.

    Independent of BTtool, the host_test app seems to have memory issues in debug.  I just tried it again in CCS and

    verified that if you simply start a debug session, hit go, wait a few seconds and then hit pause, the stack pointer

    is not valid!  I feel like something is definitely not configured correctly for debug vs ROM?  

    Bob

    ----------------------------------------------------
    - Log Start Marker                                 -
    ----------------------------------------------------
    
    [09/09/2019 08:39:10.690] <Info   > BTool - Bluetooth Low Energy Application - v1.42.16 (BLE5) {LoggingUtils}
    [09/09/2019 08:39:46.619] <Debug  > Starting Thread {RspDataInThread}
    [09/09/2019 08:39:46.622] <Debug  > Starting Thread {TxDataOutThread}
    [09/09/2019 08:39:46.624] <Debug  > Starting Thread {RxDataInThread}
    [09/09/2019 08:39:46.627] <Debug  > Starting Thread {RxTxMgrThread}
    [09/09/2019 08:39:48.388] <Info   > [1] : <Info> - 08:39:48.387
    Port opened at 9/9/2019 8:39:48 AM
    --------------------------------------------------------------------
    [09/09/2019 08:39:48.426] <Debug  > Starting Thread {ProcessRxProc}
    [09/09/2019 08:39:48.598] <Info   > [2] : <Tx> - 08:39:48.502
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    [09/09/2019 08:39:48.608] <Info   > Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [09/09/2019 08:39:50.514] <Error  > [3] : <Error> - 08:39:50.514
    Message Response Timeout
    Name = HCIExt_ResetSystemCmd
    OpCode = 0xFC1D
    Tx Time = 08:39:48.502
    --------------------------------------------------------------------
    [09/09/2019 08:39:50.524] <Warning> [4] : <Warning> - 08:39:50.523
    Device Reset Timeout
    Device May Not Function Properly
    --------------------------------------------------------------------
    [09/09/2019 08:39:50.529] <Error  > Device Reset Timeout
    Device May Not Function Properly
     {DeviceForm}
    [09/09/2019 08:39:52.122] <Error  > User Response To Message Box = OK {DeviceForm}
    
    ----------------------------------------------------
    - Log Start Marker                                 -
    ----------------------------------------------------
    
    [09/09/2019 08:40:22.480] <Info   > BTool - Bluetooth Low Energy Application - v1.42.16 (BLE5) {LoggingUtils}
    [09/09/2019 08:40:36.861] <Debug  > Starting Thread {RspDataInThread}
    [09/09/2019 08:40:36.871] <Debug  > Starting Thread {TxDataOutThread}
    [09/09/2019 08:40:36.874] <Debug  > Starting Thread {RxDataInThread}
    [09/09/2019 08:40:36.877] <Debug  > Starting Thread {RxTxMgrThread}
    [09/09/2019 08:40:38.422] <Info   > [1] : <Info> - 08:40:38.420
    Port opened at 9/9/2019 8:40:38 AM
    --------------------------------------------------------------------
    [09/09/2019 08:40:38.467] <Debug  > Starting Thread {ProcessRxProc}
    [09/09/2019 08:40:38.729] <Info   > [2] : <Tx> - 08:40:38.561
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    [09/09/2019 08:40:38.741] <Info   > Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [09/09/2019 08:40:38.804] <Info   > [3] : <Rx> - 08:40:38.772
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x05 (5) bytes(s)
     Event          : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
     Status         : 0x00 (0) (SUCCESS)
     CmdOpCode      : 0xFC1D (HCIExt_ResetSystemCmd)
    [09/09/2019 08:40:38.814] <Info   > Dump(Rx):
    0000:04 FF 05 1D 04 00 1D FC                         ........
    --------------------------------------------------------------------
    [09/09/2019 08:40:39.455] <Info   > [4] : <Tx> - 08:40:39.322
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x08 (8) byte(s)
     ProfileRole    : 0x08 (8) (
                      Central)
     AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
     RandomAddr     : 00:00:00:00:00:00
    [09/09/2019 08:40:39.464] <Info   > Dump(Tx):
    0000:01 00 FE 08 08 00 00 00 00 00 00 00             ............
    --------------------------------------------------------------------
    [09/09/2019 08:40:49.337] <Warning> [5] : <Warning> - 08:40:49.333
    GAP Device Initialization Timeout
    Device May Not Function Properly
    --------------------------------------------------------------------
    [09/09/2019 08:40:49.350] <Error  > GAP Device Initialization Timeout
    Device May Not Function Properly
     {DeviceForm}
    [09/09/2019 08:46:26.193] <Error  > User Response To Message Box = OK {DeviceForm}
    [09/09/2019 08:46:27.766] <Debug  > Exiting Thread {ProcessRxProc}
    [09/09/2019 08:46:27.774] <Debug  > Resuming Thread {TxDataOutThread}
    [09/09/2019 08:46:27.776] <Debug  > Resuming Thread {RxTxMgrThread}
    [09/09/2019 08:46:27.778] <Debug  > Resuming Thread {RspDataInThread}
    [09/09/2019 08:46:27.781] <Debug  > Resuming Thread {RxDataInThread}
    [09/09/2019 08:46:27.783] <Debug  > Pausing Thread {TxDataOutThread}
    [09/09/2019 08:46:27.785] <Debug  > Pausing Thread {RxTxMgrThread}
    [09/09/2019 08:46:27.787] <Debug  > Pausing Thread {RspDataInThread}
    [09/09/2019 08:46:27.789] <Debug  > Pausing Thread {RxDataInThread}
    [09/09/2019 08:46:27.874] <Debug  > Exiting Thread {RspDataInThread}
    [09/09/2019 08:46:27.975] <Debug  > Exiting Thread {TxDataOutThread}
    [09/09/2019 08:46:28.076] <Debug  > Exiting Thread {RxDataInThread}
    [09/09/2019 08:46:28.176] <Debug  > Exiting Thread {RxTxMgrThread}
    [09/09/2019 08:46:29.731] <Debug  > Starting Thread {RspDataInThread}
    [09/09/2019 08:46:29.739] <Debug  > Starting Thread {TxDataOutThread}
    [09/09/2019 08:46:29.741] <Debug  > Starting Thread {RxDataInThread}
    [09/09/2019 08:46:29.743] <Debug  > Starting Thread {RxTxMgrThread}
    [09/09/2019 08:46:30.852] <Info   > [1] : <Info> - 08:46:30.851
    Port opened at 9/9/2019 8:46:30 AM
    --------------------------------------------------------------------
    [09/09/2019 08:46:30.894] <Debug  > Starting Thread {ProcessRxProc}
    [09/09/2019 08:46:31.067] <Info   > [2] : <Tx> - 08:46:30.970
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    [09/09/2019 08:46:31.076] <Info   > Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [09/09/2019 08:46:31.588] <Info   > [3] : <Rx> - 08:46:31.084
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x05 (5) bytes(s)
     Event          : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
     Status         : 0x00 (0) (SUCCESS)
     CmdOpCode      : 0xFC1D (HCIExt_ResetSystemCmd)
    [09/09/2019 08:46:31.592] <Info   > Dump(Rx):
    0000:04 FF 05 1D 04 00 1D FC                         ........
    --------------------------------------------------------------------
    [09/09/2019 08:46:31.704] <Info   > [4] : <Tx> - 08:46:31.587
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x08 (8) byte(s)
     ProfileRole    : 0x08 (8) (
                      Central)
     AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
     RandomAddr     : 00:00:00:00:00:00
    [09/09/2019 08:46:31.713] <Info   > Dump(Tx):
    0000:01 00 FE 08 08 00 00 00 00 00 00 00             ............
    --------------------------------------------------------------------
    [09/09/2019 08:46:41.868] <Warning> [5] : <Warning> - 08:46:41.862
    GAP Device Initialization Timeout
    Device May Not Function Properly
    --------------------------------------------------------------------
    [09/09/2019 08:46:41.877] <Error  > GAP Device Initialization Timeout
    Device May Not Function Properly
     {DeviceForm}
    [09/09/2019 08:46:43.260] <Error  > User Response To Message Box = OK {DeviceForm}
    [09/09/2019 08:46:44.893] <Debug  > Resuming Thread {RspDataInThread}
    [09/09/2019 08:46:44.902] <Debug  > Resuming Thread {TxDataOutThread}
    [09/09/2019 08:46:44.904] <Debug  > Resuming Thread {RxDataInThread}
    [09/09/2019 08:46:44.907] <Debug  > Resuming Thread {RxTxMgrThread}
    [09/09/2019 08:46:44.909] <Debug  > Pausing Thread {RspDataInThread}
    [09/09/2019 08:46:44.911] <Debug  > Exiting Thread {ProcessRxProc}
    [09/09/2019 08:46:44.914] <Debug  > Pausing Thread {TxDataOutThread}
    [09/09/2019 08:46:44.916] <Debug  > Pausing Thread {RxDataInThread}
    [09/09/2019 08:46:44.918] <Debug  > Pausing Thread {RxTxMgrThread}
    [09/09/2019 08:46:45.020] <Debug  > Exiting Thread {RspDataInThread}
    [09/09/2019 08:46:45.121] <Debug  > Exiting Thread {TxDataOutThread}
    [09/09/2019 08:46:45.222] <Debug  > Exiting Thread {RxDataInThread}
    [09/09/2019 08:46:45.323] <Debug  > Exiting Thread {RxTxMgrThread}
    [09/09/2019 08:47:44.593] <Debug  > Starting Thread {RspDataInThread}
    [09/09/2019 08:47:44.596] <Debug  > Starting Thread {TxDataOutThread}
    [09/09/2019 08:47:44.600] <Debug  > Starting Thread {RxDataInThread}
    [09/09/2019 08:47:44.602] <Debug  > Starting Thread {RxTxMgrThread}
    [09/09/2019 08:47:46.080] <Info   > [1] : <Info> - 08:47:46.079
    Port opened at 9/9/2019 8:47:46 AM
    --------------------------------------------------------------------
    [09/09/2019 08:47:46.120] <Debug  > Starting Thread {ProcessRxProc}
    [09/09/2019 08:47:46.295] <Info   > [2] : <Tx> - 08:47:46.195
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    [09/09/2019 08:47:46.305] <Info   > Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [09/09/2019 08:47:48.208] <Error  > [3] : <Error> - 08:47:48.208
    Message Response Timeout
    Name = HCIExt_ResetSystemCmd
    OpCode = 0xFC1D
    Tx Time = 08:47:46.195
    --------------------------------------------------------------------
    [09/09/2019 08:47:48.211] <Warning> [4] : <Warning> - 08:47:48.211
    Device Reset Timeout
    Device May Not Function Properly
    --------------------------------------------------------------------
    [09/09/2019 08:47:48.213] <Error  > Device Reset Timeout
    Device May Not Function Properly
     {DeviceForm}
    [09/09/2019 08:47:54.014] <Error  > User Response To Message Box = OK {DeviceForm}
    

  • Hi Bob, 

    Thanks for the log. I don't think that is what I got yesterday when I tried it but I can check tomorrow when I'm back at the office.

    Thanks, 
    Elin

  • Hi Bob, 

    This is the log I'm getting when I'm following the steps in my previous post. 

    [1] : <Info> - 12:04:40.455
    Port opened at 18-Sep-19 12:04:40
    --------------------------------------------------------------------
    [2] : <Tx> - 12:04:40.569
    -Type           : 0x01 (Command)
    -OpCode         : 0xFC1D (HCIExt_ResetSystemCmd)
    -Data Length    : 0x01 (1) byte(s)
     Type           : 0x00 (0) (Chip Reset)
    Dump(Tx):
    0000:01 1D FC 01 00                                  .....
    --------------------------------------------------------------------
    [3] : <Rx> - 12:04:41.099
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x05 (5) bytes(s)
     Event          : 0x041D (1053) (HCIExt_ResetSystemCmdDone)
     Status         : 0x00 (0) (SUCCESS)
     CmdOpCode      : 0xFC1D (HCIExt_ResetSystemCmd)
    Dump(Rx):
    0000:04 FF 05 1D 04 00 1D FC                         ........
    --------------------------------------------------------------------
    [4] : <Tx> - 12:04:41.637
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x08 (8) byte(s)
     ProfileRole    : 0x08 (8) (
                      Central)
     AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
     RandomAddr     : 00:00:00:00:00:00
    Dump(Tx):
    0000:01 00 FE 08 08 00 00 00 00 00 00 00             ............
    --------------------------------------------------------------------
    [5] : <Rx> - 12:04:41.761
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE00 (GAP_DeviceInit)
     DataLength     : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 7F 06 00 00 FE 00                      .........
    --------------------------------------------------------------------
    [6] : <Rx> - 12:04:41.772
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x2C (44) bytes(s)
     Event          : 0x0600 (1536) (GAP_DeviceInitDone)
     Status         : 0x00 (0) (SUCCESS)
     DevAddr        : 80:6F:B0:1E:3B:A8
     DataPktLen     : 0x00FF (255)
     NumDataPkts    : 0x05 (5)
     IRK            : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     CSRK           : 2B:C3:86:BF:C5:D5:96:9A:B6:98:01:A6:14:B2:63:EE
    Dump(Rx):
    0000:04 FF 2C 00 06 00 A8 3B 1E B0 6F 80 FF 00 05 00 ..,....;..o.....
    0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2B ...............+
    0020:C3 86 BF C5 D5 96 9A B6 98 01 A6 14 B2 63 EE    .............c.
    --------------------------------------------------------------------
    [7] : <Tx> - 12:04:41.810
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x02 (2) (INIT_PHYPARAM_CONN_INT_MIN)
    Dump(Tx):
    0000:01 61 FE 02 01 02                               .a....
    --------------------------------------------------------------------
    [8] : <Tx> - 12:04:41.821
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x03 (3) (INIT_PHYPARAM_CONN_INT_MAX)
    Dump(Tx):
    0000:01 61 FE 02 01 03                               .a....
    --------------------------------------------------------------------
    [9] : <Tx> - 12:04:41.832
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x04 (4) (INIT_PHYPARAM_CONN_LATENCY)
    Dump(Tx):
    0000:01 61 FE 02 01 04                               .a....
    --------------------------------------------------------------------
    [10] : <Rx> - 12:04:41.837
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x02 (2) (INIT_PHYPARAM_CONN_INT_MIN)
     MinConnectInter: 0x0050 (80)
    Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 02 50 00             ......a...P.
    --------------------------------------------------------------------
    [11] : <Tx> - 12:04:41.843
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE61 (GapInit_getPhyParam)
    -Data Length    : 0x02 (2) byte(s)
     PHY            : 0x01 (1) (INIT_PHY_1M)
     ParamId        : 0x05 (5) (INIT_PHYPARAM_SUP_TIMEOUT)
    Dump(Tx):
    0000:01 61 FE 02 01 05                               .a....
    --------------------------------------------------------------------
    [12] : <Rx> - 12:04:41.865
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x03 (3) (INIT_PHYPARAM_CONN_INT_MAX)
     MaxConnectInter: 0x0050 (80)
    Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 03 50 00             ......a...P.
    --------------------------------------------------------------------
    [13] : <Rx> - 12:04:41.876
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x04 (4) (INIT_PHYPARAM_CONN_LATENCY)
     ConnectLatency : 0x0000 (0)
    Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 04 00 00             ......a.....
    --------------------------------------------------------------------
    [14] : <Rx> - 12:04:41.909
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x09 (9) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE61 (GapInit_getPhyParam)
     DataLength     : 0x03 (3)
     ParamId        : 0x05 (5) (INIT_PHYPARAM_SUP_TIMEOUT)
     SuperTimeout   : 0x07D0 (2000)
    Dump(Rx):
    0000:04 FF 09 7F 06 00 61 FE 03 05 D0 07             ......a.....
    --------------------------------------------------------------------
    [15] : <Tx> - 12:05:39.192
    -Type           : 0x01 (Command)
    -OpCode         : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x08 (8) byte(s)
     ProfileRole    : 0x08 (8) (
                      Central)
     AddrMode       : 0x00 (0) (ADDRMODE_PUBLIC)
     RandomAddr     : 00:00:00:00:00:00
    Dump(Tx):
    0000:01 00 FE 08 08 00 00 00 00 00 00 00             ............
    --------------------------------------------------------------------
    [16] : <Rx> - 12:05:39.215
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event          : 0x067F (1663) (GAP_HCI_ExtentionCommandStatus)
     Status         : 0x00 (0) (SUCCESS)
     OpCode         : 0xFE00 (GAP_DeviceInit)
     DataLength     : 0x00 (0)
    Dump(Rx):
    0000:04 FF 06 7F 06 00 00 FE 00                      .........
    --------------------------------------------------------------------
    [17] : <Rx> - 12:05:39.226
    -Type           : 0x04 (Event)
    -EventCode      : 0x00FF (HCI_LE_ExtEvent)
    -Data Length    : 0x2C (44) bytes(s)
     Event          : 0x0600 (1536) (GAP_DeviceInitDone)
     Status         : 0x00 (0) (SUCCESS)
     DevAddr        : 80:6F:B0:1E:3B:A8
     DataPktLen     : 0x00FF (255)
     NumDataPkts    : 0x05 (5)
     IRK            : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     CSRK           : 8C:AC:93:2F:D3:B9:3F:29:BB:B1:E2:74:98:6D:C1:68
    Dump(Rx):
    0000:04 FF 2C 00 06 00 A8 3B 1E B0 6F 80 FF 00 05 00 ..,....;..o.....
    0010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8C ................
    0020:AC 93 2F D3 B9 3F 29 BB B1 E2 74 98 6D C1 68    ../..?)...t.m.h
    --------------------------------------------------------------------
    

    Thanks,
    Elin

  • Elin,

    That looks like the behavior I am expecting, but I am still not able to see that in debug!

    Bob

  • Hi Bob, 

    As previously mentioned, I get this behavior by following the steps in my previous post. So I would encourage you to start from step 1 and follow the steps in the specified order, exactly as they say. 

    One clarification on step 3, you have to press OK here and start the BTool session. 

    Thanks, 
    Elin

  • Elin,

    I am suspecting that you are not actually debugging?  Can you please try to set

    a breakpoint in HostTestApp_taskFxn() at line 434 then run a BTool command and

    see if you hit it?  When I try this it doesn't even enable the breakpoint!  If this

    actually works for you, maybe we can Webex so I can see the steps?

    Also, I tried to use the multi_role example to connect to the project_zero example

    and pairing fails?!?  What am I doing wrong?  It seems like I just can't get any TI

    examples (except for the extremely simple and basic ones that aren't very useful)

    to work correctly?

    Thanks,

    Bob

  • Elin,

    Please disregard the comment about multi_role and project_zero.  I just realized multi_role is not a BLE5 example.

    How do I go about converting mutil_role to use the BLE5 stack?

    Thanks,

    Bob

  • Hi Bob, 

    Thanks for the clarification. If you want to use breakpoints, you have to load the symbols after connecting to the target, before pressing play. So after step 5 in my previous post you should:

    5.1 Press the load symbol and select load symbols

    5.2 Do a board reset

    5.3 Restart from main

    Proceed with step 6 and 7. 

    Unfortunately, there isn't a way to convert multi_role to the BLE5 stack for CC2640R2, then you have to use CC26x2.

    Thanks,
    Elin

  • Elin,

    I was finally able to reproduce your workaround.  I now understand the root of the problem. BTool sends

    a HCIExt_ResetSystemCmd which causes the cc2640r2f reset itself in the middle of trying to debug (self lobotomy)!

    So your workaround runs host_test out of ROM to allow the HCIExt_ResetSystemCmd to complete successfully and

    then start debugging once BTool is past it's initialization.  Then you "back-door" GAPDeviceInit to re-establish BTool

    functionality.  So you don't really need all of the steps you outlined.  Once BTool is past it's initialization you can

    simply start a new debug session and send the new GAPDeviceInit.

    Maybe the HCIExt_ResetSystemCmd implementation should look at a DEBUG compile flag and NOT actually perform

    the hardware piece of HCIExt_ResetSystemCmd if you are debugging?  Or maybe BTool can provide a check box to make

    HCIExt_ResetSystemCmd optional at BTool startup?  This is very inconvenient to workaround every time I want to debug!

    I do not understand your comment about multi_role not being able to run BLE5 stack and needing to use CC26x2?  Can you

    please explain this?  Is it due to memory restrictions?

    Thanks,

    Bob

  • Hi Bob, 

    I'm glad you found a workaround that works for you. HCIExt_ResetSystemCmd is sent when BTool is starting to make sure that existing connections are dropped.

    As I mentioned in previous posts, the host_test application is usually not simultaneously debugged and used in BTool (see the SimpleLink Academy) but I understand the inconvenience.

    There is not enough memory in CC2640R2 to fit the multi_role BLE5 application. 

    Thanks, 
    Elin

  • Sounds like we may need to move up to theCC26x2...

    One more question...any update on Bluetooth mesh support?  It is looking like

    our application will require it.  If not available soon, we may have to look at other

    solutions, which would be a shame after finally overcoming the debug issues!

  • Hi Bob, 

    We currently don't have support for Bluetooth mesh. If you move up to CC26x2 you can use multi_role which probably is enough for your application. How many connections do you need? 

    Thanks, 
    Elin

  • Elin,

    I am aware that TI does not currently have mesh support.  I was asking if there is an estimated

    time-frame for availability? We are using BLE5 long range for customer-scalable communication between

    our devices.  We do not have (nor do we want to set) a hard limit on the number of devices!  If TI will have

    mesh support soon, we would prefer to stick with TI devices.  Otherwise, TI's competitors do currently

    support mesh and we may have to consider their products? 

    Bob

  • Hi Bob,

    For questions regarding the BLE mesh roadmap contact TI Sales locally and setup an NDA for further insight. 

    See this thread for our mesh recommendation: https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/538/t/769963

    Thanks, 
    Elin