Other Parts Discussed in Thread: SYSCONFIG
Champs,
So I am building off of the dmm_wsnnode_ble_sp_app_CC1352P_2_LAUNCHXL_tirtos_ccs_syscfg base project from the TI SDK. I can tell you it's been a long a winding road; but I have things working decently after a lot of work (because of my system; not your demo per se); but I have run into a snag that I could use some guidance on.
The issue I think I have is that I don't think the DMM priority is working/being honored properly; or it's pilot error and I don't know what I'm doing. What I changed was the table I found in dmm_priority_ble_wsn.c which I think I understood to be the thing the DMM uses to figure out what to do when 2 things compete.
What I want to have happen is that the WSN/Sub1GHz network always have priority over the BLE. Now I think that's not exactly going to work, because BLE was designed by committee and whilst it allows you to specify a number of missed connection events; no phone manufacturer seems to really let you specify any number other than 0.... but for the moment lets just focus on advertsiing, since for 99.8% of its life the product doesn't have a BLE connection. So I want all my WSN activity to be higher priority than BLE- and if i miss an advertising event so be it. This is what I set up:
/* Global Priority Table: BLE connection lower than WSN data */
StackActivity activityBLE_bleLwsnH[ACTIVITY_NUM_BLE*PRIORITY_NUM] =
{
/*do not change the activity order */
DMM_GLOBAL_PRIORITY(DMM_BLE_CONNECTION, DMM_StackPNormal, 80),
DMM_GLOBAL_PRIORITY(DMM_BLE_CONNECTION, DMM_StackPHigh, 170),
DMM_GLOBAL_PRIORITY(DMM_BLE_CONNECTION, DMM_StackPUrgent, 250),
DMM_GLOBAL_PRIORITY(DMM_BLE_CON_EST, DMM_StackPNormal, 100),
DMM_GLOBAL_PRIORITY(DMM_BLE_CON_EST, DMM_StackPHigh, 200),
DMM_GLOBAL_PRIORITY(DMM_BLE_CON_EST, DMM_StackPUrgent, 220),
DMM_GLOBAL_PRIORITY(DMM_BLE_BROADCASTING, DMM_StackPNormal, 70),
DMM_GLOBAL_PRIORITY(DMM_BLE_BROADCASTING, DMM_StackPHigh, 160),
DMM_GLOBAL_PRIORITY(DMM_BLE_BROADCASTING, DMM_StackPUrgent, 210),
DMM_GLOBAL_PRIORITY(DMM_BLE_OBSERVING, DMM_StackPNormal, 70),
DMM_GLOBAL_PRIORITY(DMM_BLE_OBSERVING, DMM_StackPHigh, 160),
DMM_GLOBAL_PRIORITY(DMM_BLE_OBSERVING, DMM_StackPUrgent, 210),
};
StackActivity activityWSN_bleLwsnH[ACTIVITY_NUM_WSN*PRIORITY_NUM] =
{
/*do not change the activity order */
DMM_GLOBAL_PRIORITY(DMM_WSN_RETRANSMIT, DMM_StackPNormal, 90),
DMM_GLOBAL_PRIORITY(DMM_WSN_RETRANSMIT, DMM_StackPHigh, 180),
DMM_GLOBAL_PRIORITY(DMM_WSN_RETRANSMIT, DMM_StackPUrgent, 240),
DMM_GLOBAL_PRIORITY(DMM_WSN_TRANSMIT, DMM_StackPNormal, 90),
DMM_GLOBAL_PRIORITY(DMM_WSN_TRANSMIT, DMM_StackPHigh, 180),
DMM_GLOBAL_PRIORITY(DMM_WSN_TRANSMIT, DMM_StackPUrgent, 240),
// DC testing; this was 90
DMM_GLOBAL_PRIORITY(DMM_WSN_RECEIVE, DMM_StackPNormal, 170),
DMM_GLOBAL_PRIORITY(DMM_WSN_RECEIVE, DMM_StackPHigh, 180),
DMM_GLOBAL_PRIORITY(DMM_WSN_RECEIVE, DMM_StackPUrgent, 240),
};
So I at least have all the DMM TX/RX higher for each priority level than the BLE advertising; though what I see happening is that BLE advertising packets are still interrupting my TX or RX events. And from what I can tell; those advertising events are happening at exactly the 100ms advertising interval (+/- entropy); which would imply to me that they're not getting elevated to a higher level and being retried; lest they'd be temporally displaced by some time; it more seems to me the DMM just isn't paying attention to this table (or again, pilot error) Now I could go and set ALL the priority numbers for WSN higher than the highest BLE advertising number (or lower all the advertising priority numbers I guess); but I wanted an opinion first because my whole system has a lot of nodes; and changing it takes a little time/effort to debug again.
BTW, if there were an API that would disable advertising and then one to re-enable it quickly; I could do that. In my system, and I suspect this is true of many customers systems; the WSN bandwidth/usage is really pretty low; mine for example only takes ~40ms out of every 30s; so if I just DIDN'T do that one advertisement that happened to potentially be in the way; it would be fine.