CC2340R5-Q1: Code flow support for CC2340R5 stack.

Part Number: CC2340R5-Q1
Other Parts Discussed in Thread: CC2340R5, SYSCONFIG, UNIFLASH

Dear All,

Actually we have the customer requirement of both Peripheral + Observer mode includes the OAD On-Chip support.

We had already worked with TI CC2642 R1 stack and implemented the same customer requirements.

In this chipset we are facing slight difference in the stack level. And we required some assistance for setting up the stack.

Imported the Basic_ble_LP_EM_CC2340R5 project from the SDK version - 7.4.0 and the IDE version - 12.5. The base project is advertising and connectable through LightBlue application.

#if ( HOST_CONFIG & ( CENTRAL_CFG | PERIPHERAL_CFG ) ) - How to enable this parameter in the code. I checked in Sysconfig, but this information is not present.

And suggest that which Base project is suitable for this Requirements.

  • Greetings Abinesh,
    If you want to enable the peripheral and observer at the same time for the Basic_Ble example, you can configure this under the BLE settings->Device Role. This will then generate the defines that are necessary to enable the block you have shown. You will see that the generated defines will get placed under ti_build_config.opt

    If you want to achieve peripheral + observer, and be able to use OAD, instead of the basic_ble example, you could perhaps look at basic_ble_oad_offchip or basic_ble_oad_onchip. These, in my opinion, would be more comfortable starting projects for what you and your customer are hoping to achieve

  • Hi Achyut,

    As per the discussion, we enabled both observer and peripheral  mode in sysconfig. But in Observer.c file all are disabled.

    Please share your inputs.

    Thanks & Regards,

    Abinesh R

  • Greetings Abinesh,
    Have you rebuilt the project after saving the sysconfig settings? The changes will only be visible after you have built the project post sysConfig-modification.
    Best,
    Achyut Ray

  • Hi Achyut Ray,

    Yes, rebuilded the project after done changes in sysconfig. Even though that code sections are not enabled.  

    basic_ble_oad_offchip or basic_ble_oad_onchip is not flashing in the Eval board which we have. During flashing it throws some error in the console.

    Regards,

    Abinesh R

  • Any updates regarding this quires

  • Greetings Abinesh R,
    For the error that you have shown, please use Uniflash to perform a complete chip erase, and then try to flash the device again. Can you please share what your ti_build_config.opt looks like? I ran the same build as you on my PC, and I do not see the same behavior, hence I'd like to see what you are working with.
    Best,
    Achyut Ray

  • Greetings,

    Chip erase also did but particularly OAD project is not flashing in this Eval kit CC2340.

    Can you share the GATT Service creation link for this SDK version 7.4

    Thanks & Regards,

    Abinesh R

  • Hi Team,

    1) Still i am facing the issue in flashing the OAD on chip code through CCS compiler. I tried through Uniflash tool, the OAD project is flashing but we tried for the OAD functionality in the persistent app layer from TI starter application - after selecting the start OAD button from app, it's loading for some time and app getting crashed. We tried with multiple phones the same issue is happening.

    2) I need to control the advertisement for that i created two local functions(enable & disable ble), but those functions are not working. Can you guide me for this implementation whether i am doing the right function call API's.

    Thanks & Regards,

    Abinesh R

  • Hi Team,

    Any updates regarding this above queries.

    Thanks & Regards,

    Abinesh R

  • Greetings Abinesh,

    Apologies for the delayed response due to Easter break. When you say that the app crashes, could you elaborate on what kind of crash you are seeing? Does the chip enter an infinite loop? Does it reset, does it get stuck somewhere?

    As for the enable and disable BLE functions that you have created, at least the enable function does not have entirely correct logic|. To enable BLE advertising the flow should be the following:


    Initialize Advertising Set -> Load data by advertising handle -> Set Event Mask -> Enable Advertising
    Note that the initialization of the advertising set, loading of data, and setting the event mask are only required once, usually done when a new advertising set is created. After the set has been created and initialized, it should suffice to call enable and disable APIs (BLEAppUtil_advStart and BLEAppUtil_advStop)

    This means that for your function, you should only need to call BLEAppUtil_initAdvSet() and then BLEAppUtil_advStart() . What about these functions doesn't work? May I also know where you are calling your custom enable and disable functions from?

    Best,
    Achyut Ray

  • Hi Ray,

    1) For TI simple link starter application crash issue, please find the below steps

    Step 1: Connected with persistent app

    step 2: Start OAD 

    step 3: Select custom/ factory FW screen it's loading for some time, after that getting crashed and returned back to scanned device listing screen. Can't perform the FW flashing through simpleLink starter application.  Note :This same issue we are facing with TI CC2642 SDK 5.2 as well. 

    2)For advertisement control functions issue,

    step 1:Both Enable & Disable function is returned in app_peripheral.c

    step 2: Disable BLE function is called in App_StackInitDoneHandler - This is working fine.

    Note : If I call Disable & Enable in App_StackInitDoneHandler both the functions are working fine. But in our requirement we will get one command through UART at that time only we need to call this Enable ble function for advertisement.

    Step 3: Called the Enable advertisement function in UART.c file - is not working. We written the trace inside the function for testing purpose. It's entering inside but advertisement is not started.

    3) Whether in which mode (standby/Idle mode), we can able to achieve the advertisement and connection. If yes, please share the required documents to implement this functionality in our project.  

    Thanks & Regards,

    Abinesh R

  • Hi Team,

    Any updates regarding this above queries.

    Thanks & Regards,

    Abinesh R

  • Hi Team,

    Any updates regarding this above queries.

    Thanks & Regards,

    Abinesh R