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.

osal_start_timerEx maximum timeout

Other Parts Discussed in Thread: Z-STACK, CC2530

Hi,

I am using z-stack home 1.2.1 (C2530) and I know the osal_start_timerEx() maximum timeout has changed to unit32 from uint16

uint8 osal_start_timerEx( uint8 taskID, uint16 event_id, uint32 timeout_value )

but my processor does not wake up if I go from, say, a timer setting of 60000 to 90000. I haven't tried the 65535 threshold exactly but I guess that it is still working only on 16-bits? If not, what else could be causing my processor to not wake. Incidentally, this is a timer which starts and stops the joining cycle on a ZED when the parent (ZC) is lost.

Can anyone please confirm either way? It will save my processor waking up each 60s to increment a count five times to get a 5m timeout.

Many thanks,

  • Hi Andrew,

    How did you check if the CC2530 didn't wake up? Have you tested with and without the compiler option POWER_SAVING and found that it worked only when POWER_SAVING is not defined?

    By the way, since CC2530 has 24-bit sleep timer running at 32.768kHz, the maximum sleep period is 511 seconds.

    - Cetri

  • Hi Cetri,

    I have a shunt resistor in series with the Vcc of my module with a scope across. I get a nice 1.5 - 2.0 uA when in sleep mode with a 60s timer running on the ZED for sending a temperature message. So I can see quite easily when the CC2530 is awake or asleep and can put the scope in single trigger mode to capture any awake events.

    I can confirm that the timer does indeed work with a value of 70000 so it is definitely not a 16-bit versus 32-bit (24-bit) issue which I am sure you knew already.

    After a little more investigation I can also confirm that it works perfectly when POWER_SAVING is disabled. I also tried disabling my 60s timer from starting up just in case it was somehow affecting the rejoin timer, but it made no difference.

    Something is happening in sleep mode which is stopping my rejoin timer from running when set to 90s or more. I need to investigate further but there is probably some other task that runs at 90s and stops my rejoin timer somehow. I am sure it's something I have done in my code. I will look through halSleep() and see if I can spot anything, it is a version from the previous stack 2.5.1a and there may be a difference between Home 1.2.1 which I haven't brought across.

    Thanks for your help - everything else seems to work great so far.

    Andy

     

  • Hi Andy,

    I think the answer is in your descriptions. halSleep() in Z-Stack 2.5.1 uses 16-bit timer value.

    - Cetri