CC2652P: Questions about using DMM.

Part Number: CC2652P
Other Parts Discussed in Thread: SYSCONFIG

Hi, I use CC2652P, simplelink_cc13x2_26x2_sdk_4_40_04_04, CCS10.2.

My application is based on dmm example as below

This example is about DMM. And I have read about DMM user guide in SDK docs.

But honestly, I still not very understand how to use DMM.

In example, there is DMMPolicy_updateApplicationState() in runtime.

To be specific, in ble application logics and 15.4 application logics, there are these function calls.

DMMPolicy_updateApplicationState(DMMPolicy_StackRole_BlePeripheral, DMMPOLICY_BLE_CONNECTED);
DMMPolicy_updateApplicationState(DMMPolicy_StackRole_BlePeripheral, DMMPOLICY_BLE_HIGH_BANDWIDTH);
DMMPolicy_updateApplicationState(DMMPolicy_StackRole_BlePeripheral, DMMPOLICY_BLE_CONNECTING);
DMMPolicy_updateApplicationState(DMMPolicy_StackRole_BlePeripheral, DMMPOLICY_BLE_ADV);

DMMPolicy_updateApplicationState(DMMPolicy_StackRole_154Sensor, DMMPOLICY_154_UNINIT);
DMMPolicy_updateApplicationState(DMMPolicy_StackRole_154Sensor, DMMPOLICY_154_PROVISIONING);
DMMPolicy_updateApplicationState(DMMPolicy_StackRole_154Sensor, DMMPOLICY_154_CONNECTED);

I don't really understand when to make these function calls.

If I delete all example application logics, and develop my own application logics based on ble stack and 802.15.4 stack, then, I want to ask, under what condition need I use this API and these function calls?

Thanks.

  • Hi yingtao,

    Have you reviewed the DMM SimpleLink Academy Labs?  This API updates the current policy defined for each stack application state (ti_dmm_application_policy.h generated by SysConfig)  to make scheduling decisions.  The weight of each policy as created in SysConfig -> DMM -> Policy  helps determine the priority when the DMM scheduler needs to determine which stack should be used at any given moment. 

    So for example, when the BLE Peripheral Application State is DMMPOLICY_BLE_OAD then the 15.4 Sensor stack is paused in the default example's Policy 0.  In Policy 1, DMMPOLICY_BLE_CONNECTING and DMMPOLICY_BLE_HIGH_BANDWIDTH application states have a prioritized weight over the 15.4 Stack.  For any other application states (BLE or 15.4), the 15.4 Sensor is given a slightly higher weight as shown in Policy 2. 

    Priority is also determined by the current activity and weights shown in dmm_priority_ble154sensor.c, however it is not recommended that customers modify these values too far from the presets.  So you would change the application states within your project to further determine behavior of the DMM scheduler based on what its current state (idle, joining, connected, OAD, high volume traffic, etc.)

    Regards,
    Ryan