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: CC2340R5 Disconnection issue

Part Number: CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Dear TI Team,

I am working on a BLE module (CC2340R5) based on the data stream example provided in the simplelink_lowpower_f3_sdk_8_10_01_02. The module is configured as a GATT server, and I am using the Android application Bajaj Ride Connect to connect to the module.

The module operates as expected; however, I am encountering an issue where it disconnects from the client (phone) after approximately 2 hours of operation. I have analyzed the heap memory using the Real-Time Object View (ROV) in Code Composer Studio and found no signs of memory exhaustion or leaks.

Could this issue be related to the BLE stack? If so, are there specific configurations or debugging techniques you recommend to investigate this further? Additionally, is there a known timeout, parameter setting, or other potential cause for such behavior in the BLE stack?

Any insights or suggestions you could provide to help resolve this issue would be greatly appreciated.

Thank you for your support.

Best regards,

Shivam

  • Hi Shivam,

    There have been several releases since the 8.10 SDK release of the F3 SDK. Could you test this behavior on the latest 8.40 SDK to see if it is still present?

    Best Regards,

    Jan

  • Hi Jan,


    I attempted to integrate my code into the SDK 8.40, but unfortunately, it is not functioning as expected. Upon debugging, I identified that the App_StackInitDoneHandler callback in the function BLEAppUtil_init is not being triggered. Below, I have provided relevant details for your reference:

    1. Current Environment Details:

      • CCS Eclipse Version: 12.8.1.00005
      • SysConfig Version: 1.22
      • Compiler Version: TI Clang v3.2.2.LTS

    2. Observation from Release Notes:

      • The release notes for SDK 8.40 specify compatibility with CCS Theia v1.5.1.
      • I tested the code on CCS Theia v1.5.1 using two compiler versions (TI Clang v3.2.2.LTS and TI Clang v4.0.0.LTS). While the code compiles successfully in both scenarios, the issue persists.

    3. Behavior in SDK 8.20:

      • The same code works as expected in SDK 8.20.
      • Since no changes were made to the code, it should theoretically function correctly in SDK 8.40 as well.

    I would greatly appreciate any insights or suggestions you can provide to help resolve this issue. Your guidance will be invaluable in identifying potential causes or configurations that may differ between SDK 8.20 and 8.40.

    Looking forward to your response.


    void App_StackInitDoneHandler(gapDeviceInitDoneEvent_t *deviceInitDoneData)
    {
        bStatus_t status = SUCCESS;
        //DevInfo_start();
        vfn_BCPT_Init();
        s_DSM_Init();
        Peripheral_start();
        Connection_start();
        Pairing_start();
        Data_start();
    }
    
    /*********************************************************************
     * @fn      appMain
     *
     * @brief   Application main function
     *
     * @return  none
     */
    void appMain(void)
    {
        // Call the BLEAppUtil module init function
        /*BLEAppUtil_init(&criticalErrorHandler,
                        &App_StackInitDoneHandler,
                        &appMainParams, 
                        &appMainPeriCentParams);*/
        /* Call driver init functions */
        GPIO_init();
        //vfn_NVSM_init();
        //vfn_NVSM_writeNVforFirstTime();
        
        //vfn_BTUML_Init();
    
        uint32_t counterTarget;
        lgptHandle = NULL;
        LGPTimerLPF3_Params params;
        LGPTimerLPF3_Params_init(&params);
        params.hwiCallbackFxn = timerCallback;
        lgptHandle = LGPTimerLPF3_open(0, &params);
        //if(lgptHandle == NULL) {
        //  Log_error0("Failed to open LGPTimer");
        //  Task_exit();
        //}
        counterTarget = 48000;  // 1 ms with a system clock of 48 MHz
        LGPTimerLPF3_setInitialCounterTarget(lgptHandle, counterTarget, true);
        LGPTimerLPF3_enableInterrupt(lgptHandle, LGPTimerLPF3_INT_TGT);
        LGPTimerLPF3_start(lgptHandle, LGPTimerLPF3_CTL_MODE_UP_PER);
    
        BLEAppUtil_init(&criticalErrorHandler,
                        &App_StackInitDoneHandler,
                        &appMainParams,
                        &appMainPeriCentParams);
    }
    


    Shivam

  • Hi Shivam,

    Understood. Can you verify that step 3 of the migration guide related to the post-build step has been done?

    https://dev.ti.com/tirex/content/simplelink_lowpower_f3_sdk_8_40_00_61/docs/ble5stack/ble_user_guide/html/ble-stack-5.x-guide/porting-guides/cc23xx/CC23XX_SDK_8.20_to_8.40.html

    Best Regards,

    Jan

  • Hi Jan,

    Step 3 of the migration guide has been completed. However, the following WARNING related to the ti_utils_build_GenMap_sym_CRC_CCFG symbol for the .elf file persists. All other configurations remain unchanged as previously described, but the issue has not been resolved. Below is the warning:

    INFO:root:Iterating symbols, looking for prefix: ti_utils_build_GenMap_sym_CRC_CCFG
    WARNING:root:No symbols with prefix: ti_utils_build_GenMap_sym_CRC_CCFG found
    WARNING:root:No CRC was inserted into file
    INFO:root:Writing patched ELF file to cc2340r5_telit_fw.out

    In addition to the previously mentioned warning, I am also encountering the following warning during the build process. Could you please provide clarification regarding it also:

    Invoking: Arm Linker
    "C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang.exe" @"C:/ti/simplelink_lowpower_f3_sdk_8_40_00_61/source/ti/ble5stack_flash/config/build_components.opt" @"C:/ti/simplelink_lowpower_f3_sdk_8_40_00_61/source/ti/ble5stack_flash/config/factory_config.opt"  -march=thumbv6m -mcpu=cortex-m0plus -mfloat-abi=soft -mlittle-endian -mthumb -O0 -DICALL_NO_APP_EVENTS -DCC23X0 -DNVOCMP_NWSAMEITEM=1 -DFLASH_ONLY_BUILD -DUSE_RCL -DFREERTOS -DNVOCMP_POSIX_MUTEX -gdwarf-3 -ffunction-sections -Wl,-m"cc2340r5_telit_fw.map" -Wl,-i"C:/ti/simplelink_lowpower_f3_sdk_8_40_00_61/source" -Wl,-i"D:/BAJAJ_K10_Module/ProjectsCodeSDK820_810_k10/volumecodebyeduard/codevolume/cc2340r5_telit_fw/Release/syscfg" -Wl,-i"C:/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/lib" -Wl,--reread_libs -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="cc2340r5_telit_fw_linkInfo.xml" -Wl,--rom_model -o "cc2340r5_telit_fw.out" "./syscfg/ti_ble_config.o" "./syscfg/ti_devices_config.o" "./syscfg/ti_radio_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_freertos_config.o" "./syscfg/ti_freertos_portable_config.o" "./SRC/CC2340R5_COMMON_LIBS/BLEAppUtil/bleapputil_init.o" "./SRC/CC2340R5_COMMON_LIBS/BLEAppUtil/bleapputil_process.o" "./SRC/CC2340R5_COMMON_LIBS/BLEAppUtil/bleapputil_stack_callbacks.o" "./SRC/CC2340R5_COMMON_LIBS/BLEAppUtil/bleapputil_task.o" "./SRC/CC2340R5_COMMON_LIBS/Drivers/NV/crc.o" "./SRC/CC2340R5_COMMON_LIBS/Drivers/NV/nvocmp.o" "./SRC/CC2340R5_COMMON_LIBS/MenuModule/menu_module.o" "./SRC/CC2340R5_COMMON_LIBS/Services/dev_info/dev_info_service.o" "./SRC/CC2340R5_COMMON_LIBS/Startup/ble_user_config_stack.o" "./SRC/CC2340R5_COMMON_LIBS/Startup/osal_icall_ble.o" "./SRC/CC2340R5_COMMON_LIBS/Startup/rom_init.o" "./SRC/CC2340R5_COMMON_LIBS/iCall/icall_POSIX.o" "./SRC/CC2340R5_COMMON_LIBS/iCall/icall_cc23x0.o" "./SRC/CC2340R5_COMMON_LIBS/iCall/icall_user_config.o" "./SRC/CC2340R5_COMMON_LIBS/iCallBLE/ble_stack_api.o" "./SRC/CC2340R5_COMMON_LIBS/iCallBLE/ble_user_config.o" "./SRC/CC2340R5_COMMON_LIBS/iCallBLE/icall_api_lite.o" "./SRC/PROJECT_ASSOCIATED_LIBS/PROJECT_TOP_LEVEL/main/app_main.o" "./SRC/PROJECT_ASSOCIATED_LIBS/PROJECT_TOP_LEVEL/main/main_freertos.o" "./SRC/app/AMSM_Apple_Media_Service_Manager.o" "./SRC/app/AMSP_Apple_Media_Service_Protocol.o" "./SRC/app/ANCSM_Apple_Notification_Center_Service_Manager.o" "./SRC/app/ANCSP_Apple_Notification_Center_Service_Protocol.o" "./SRC/app/ATCP_AT_Command_Parser.o" "./SRC/app/BCPT_Bluetooth_Communication_Packets.o" "./SRC/app/BTBCH_Bluetooth_Bootloader_Checksums.o" "./SRC/app/BTCM_Bluetooth_Configuration_Manager.o" "./SRC/app/BTUML_Bluetooth_Uart_Middle_layer.o" "./SRC/app/CALLM_Call_Manager.o" "./SRC/app/CONN_Connectivity.o" "./SRC/app/MM_Music_Manager.o" "./SRC/app/NOTM_Notifications_Manager.o" "./SRC/app/app_connection.o" "./SRC/app/app_data.o" "./SRC/app/app_pairing.o" "./SRC/app/app_peripheral.o" "./SRC/app/Profiles/DSM_Data_Stream_Manager.o" "./SRC/app/Profiles/data_stream_profile.o" "./SRC/app/Profiles/data_stream_server.o" "../cc23x0_app_freertos.cmd"  -Wl,-lti_utils_build_linker.cmd.genlibs -Wl,-llibc.a 
    warning #10247-D: creating output section ".log_data" without a SECTIONS specification
    Finished building target: "cc2340r5_telit_fw.out"
     

    Regards,
    Shivam

  • Hi,

    Got it. I believe between the 8.10 and 8.40 versions the  GenMap symbols were introduced to ease linker file modifications. Have you modified your linker file at all? If not, then can you grab one from the latest SDK and use that one instead of the one present in your project? I believe that should resolve the new warnings you see.

    Best Regards,

    Jan

  • Hi Jan,

    Yes, I have modified the linker file and updated the stack size value to 1200 for testing purposes. Following your suggestion, I replaced the linker file with the latest SDK version, which resolved the warnings I was encountering earlier. Thank you for your assistance with that.

    However, I am still unable to run my code on SDK version 8.40, despite all other specifications remaining the same. Could you please investigate the issue?

    Regards,

    Shivam

  • Hi Shivam,

    No problem! Can you clarify what behavior you are seeing? Does the application boot at all? If you debug the application and pause execution, where does the debugger pause?

    Best Regards,

    Jan

  • Hi Jan,

    The application is booting correctly. In my previous response in this thread, I mentioned that while debugging, I observed that the App_StackInitDoneHandler callback is not invoked in the BLEAppUtil_init function when using SDK 8.40. Upon further investigation, I discovered that the LL_ProcessEvent() function in the file ll.c is not being called. The debugger is unable to locate the source file at the specified path:
    C:\.conan\da6380\1\source\ti\ble5stack_flash\lib_projects\CC2340R5\OneLib\lib\ticlang\m0p/../../../../../../controller/cc26xx/ll/ll.c.

    I am not certain, but this behavior suggests that the BLE stack may be actively running or stuck in its Link Layer processing.

    Regards,

    Shivam

  • Hi Shivam,

    I believe I have seen behavior similar to this before. Can you ensure that the global parameters in your RNG module within SysConfig match the following?

    Best Regards,

    Jan

  • Hi Jan,

    Following your response above, we successfully integrated the 8.40 SDK and resolved the disconnection issue mentioned in the first message. Thank you for your support.

    Regards,

    Shivam

  • Hi Shivam,

    Glad to hear! If there are no further issues related to this migration, then I will close the thread out for now. If you do have any issues related to the migration, then please reply to this message to reopen the thread. Otherwise, feel free to open a new thread and we will help you there as soon as possible.

    Best Regards,

    Jan