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-CC1352P: After a cold start or reset, the Bluetooth connection will automatically disconnect once connected

Part Number: LAUNCHXL-CC1352P
Other Parts Discussed in Thread: UNIFLASH

Tool/software:

I followed the instructions in the TI BLE5 Stack Quick Start Guide and burned my recompiled project_zero into my development board. The SDK version I used was 8.31.00.11, and the compiler was iar9.40. After burning and running it directly using the emulator, I was able to connect and operate normally using TI STARTER on my phone without disconnecting for a long time. However, pressing the reset button on the development board to reset or power off will result in the situation shown in the picture, where Bluetooth automatically disconnects after connecting, and then continues to reconnect and disconnect, repeating the process. May I ask how to solve this problem?

  • Hi !

    Could you try reproducing this issue with a different phone/central or another BLE application like nrfConnect ?

    Kind regards,
    Maxence

  • Thanks for you relpy.

    I used the app LightBlue for connection, and it was the same situation.

  • Hi !

    your GAP message handler, you can filter for the message opcode. In the case of a disconnection, the opcode is GAP_LINK_TERMINATED_EVENT

    The simple_peripheral example shows how to do this. In the snippet above, you can cast pMsg to a gapTerminateLinkEvent_t object, which has a "reason" field. This field will indicate you why was the connection terminated, by comparing it to the values in ll.h.

    Kind regards,
    Maxence

  • I will use your method to debug and find the reason for the disconnection later.
    Before that, I burned the pre compiled firmware "project_zero_unsecure_app. hex" from the SDK onto the development board.
    After cold start, everything is connected normally and there will be no automatic disconnection. So I guess it's because the version I compiled myself doesn't match the BIM hex file. The BIM firmware version I burned is bim_offchip → debug_unsecure, and the define setting of the version I compiled myself is shown in the picture below. Is it possible that there is a mismatch between BIM and project_zero settings causing this issue. Because if I run Project Zero directly with the emulator and the BIM jumps off and runs directly, everything is normal at this time.

  • I found the reason for the automatic disconnection of Bluetooth. I completely deleted the flash and only burned it into the BIM. After powering it back on, there was also a Project Zero app running, and the Bluetooth connection also automatically disconnected after being connected. So I can confirm that the BIM did not jump to the app I was burning after running, but instead ran my own app, which caused the Bluetooth to automatically disconnect, but I don't know how to solve this problem.

  • Hi !

    I would advise you to look at this SimpleLink Academy Training about the project_zero example. It tackles the subject of BIM for project_zero and the reason why you need BIM : 

    Please note that this project is configured for updates over the air (OAD) by default. This means that you can upload a new version or a totally different project to the LaunchPad from your mobile phone.

    It also means that the project is compiled and linked in such a way that you MUST have the bim_offchip project present in the internal flash of the device first for the project to work correctly. More on this later.

    To run project_zero, you can first debug the BIM and then debug the project_zero example.

    Kind regards,
    Maxence

  • I followed the guidance of SimpleLink Academy Training about the project_zero example and re burned the BIM and projectzero to my cc1352 development board, but as long as it was a cold start, it would automatically disconnect repeatedly. I think it's because BIM cannot guide me into the Project Zero app. Can you tell me if there is a method to run the user program directly after power failure and restart without BIM guidance? Thank you!

  • Hi,

    Could you show me with screenshots the steps you are taking to flash BIM and your project ? At which addresses/offsets are you flashing the BIM and the project ? Can you try using other flashing methods like UniFlash ?

    Kind regards,
    Maxence

  • Will pressing both buttons simultaneously erase external flash while running other demos have an impact?I confirm that I compiled and burned BIM and apps according to the official guidelines, using IAR, CCS, and UFLash.

  • What guidelines are you following ? Can you try flashing the default project_zero and BIM project and see if they work

  • I followed the steps in this guide (dev.ti.com/.../ble_01_basic.html) to compile and burn BIM and Project apps. Next, I will explain my complete operation and the phenomena that occurred in the form of screenshots.

    1.According to the instructions, import the BIM project into CCS and successfully compile it, using the original settings without any changes.

    2. Start debugging, burn BIM into the development board, and run it.

    3.Import project zero according to the instructions and compile successfully. No original settings were changed during compilation.

    4. Start debugging, burn project zero into the development board, and run it.

    5. Using the mobile phone to launch the Ti starter app allows for stable and normal connection to the development board. The following figure shows the information displayed on the serial port terminal.

    6. Next, the ti starter will exit the connection and cold start the development board. The development board will output the following restart message, indicating successful startup.

    7.When using TI STARTER to connect again, the connection will automatically disconnect, as shown in the serial port information in the following figure.

    8.Then I used uflash to burn the pre compiled image of the project zero.

    9.The following picture shows my burning process. After successful burning, I cold started the development board and used ti start to connect and restore it to normal without automatic disconnection.

    The above is the entire process of my testing. Please provide suggestions.
    Thanks a lot!

  • Hi !

    The way you are flashing in UniFlash seems incorrect, since you need to also flash the BIM. The way to flash both the BIM and the project_zero files is to click the "plus" button above "Available actions". The files must first be the BIM and then the Project_zero firmware, like this :

    Kind regards,
    Maxence

  • I will burn hex files according to your method.

    Secondly, can you tell me which BIM hex folder and which HEX file are suitable when I burn the official project zero?

    Because the setting options in the official project zero that I am compiling now are shown in the following figure, I found that there are pre-defined security and flash ROM related settings inside.

    Thanks a lot!

  • Hi !

    project_zero is meant to be used with bim_offchip, as said in the SLA I linked you earlier.

    Please note that this project is configured for updates over the air (OAD) by default. This means that you can upload a new version or a totally different project to the LaunchPad from your mobile phone.

    It also means that the project is compiled and linked in such a way that you MUST have the bim_offchip project present in the internal flash of the device first for the project to work correctly. More on this later.

    Kind regards,
    Maxence

  • I encountered an error while burning according to your example image. The following image will provide an explanation.

    1.Select the BIM hex file, the file path is shown in the following figure

    2. Select the officially compiled project zero hex file, with the file path shown in the following figure

    3. The error messages that occur during burning are shown in the following figure

  • Hi x y,

    I apologize for the confusion in resources, as project_zero_unsecure_app.hex is a combined BIM + BLE application file (known as a production image).  If you need to load both the BIM and BLE application separately then you should be using the .bin file generated from your project_zero workspace.  Please use Uniflash with the "Off-chip" instructions from this SimpleLink Academy Lab:

    https://dev.ti.com/tirex/content/cc13xx_cc26xx_simplelink_academy_8_31_00_00/_build_cc13xx_cc26xx_simplelink_academy_8_31_00_00/source/ble5stack/ble_enhanced_oad_fundamentals/ble_enhanced_oad_fundamentals.html#oad-target-setup 

    Regards,
    Ryan