Other Parts Discussed in Thread: Z-STACK, CC2520
Hi,
I have an application where one of the tasks (task 4) use Osal-timer to create events every 5s, when event is received sequence number is incremented by one which I printed out in my test as follows:
22.10.2015 15:46:13 [00:00:05:002579] SEQ=0000000227
22.10.2015 15:46:18 [00:00:05:018610] SEQ=0000000228
22.10.2015 15:46:29 [00:00:10:026100] SEQ=0000000229
22.10.2015 15:46:34 [00:00:05:018009] SEQ=0000000230
22.10.2015 15:46:39 [00:00:04:986703] SEQ=0000000231
Delay between events 228 and 229 is 10 seconds , it should be 5s. This happens always when Z-Stack layers are requested to seek network. If they find network and connect to it, the delay was even longer around 19s.
To me it looks like ZB layers takes all MCU resources to handle network discovery/joining process and lower priority tasks cannot receive timer events before ZB layers have completed their task. However 10-19 delay is huge for embedded software.
Have you experienced the same, any ideas where this could come from?
I use this delivery:
Z-Stack Energy 1.1.0-S
We have dualchip HW MSP5438+cc2520
Tasks are run in this order:
const pTaskEventHandlerFn tasksArr[] = {
macEventLoop,
nwk_event_loop,
Hal_ProcessEvent,
APS_event_loop,
ZDApp_event_loop,
Task1_ProcessEvent,
Task2_ProcessEvent,
Task3_ProcessEvent,
Task4_ProcessEvent,
...more tasks...
Regards,
Ari