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.

CC1352P: an issue on OsalPortTimers_getTimerTimeout

Part Number: CC1352P

Base on TI-RTOS, "OsalPortTimers_getTimerTimeout" returns "0" not only means the timer is not running. When the timer remains less than 1ms, the event will be trigger as soon as moment. But the return value of OsalPortTimers_getTimerTimeout can mislead the program that timer is not running.

  • Hi Aries,

    I am not sure I fully understand the question. is there a bug in the return value? 

    Or are you saying there is possible improvements to OsalPortTimers_getTimerTimeout behavior? If this is the case, please can you explain what your expected behavior would be?

    Regards,

    Sid

  • For example, in "ZDO_JoinIndicationCB", the executing "timeToFire = OsalPortTimers_getTimerTimeout( ZDAppTaskID, ZDO_NEW_DEVICE )".

    When "timeToFire " is "0", it be possible the timer for ZDO_NEW_DEVICE event is not running, also be possible this timer will trigger ZDO_NEW_DEVICE at once. If it be that the timer will trigger ZDO_NEW_DEVICE at once, the after processing "OsalPortTimers_startTimer( ZDAppTaskID, ZDO_NEW_DEVICE, ZDAPP_NEW_DEVICE_TIME )" will delay to trigger ZDO_NEW_DEVICE .

  • Hi Aries,

    I just want to clarify this further. Are you seeing delays in the Zstack network? And you believe the root cause is the OsalPortTimers_getTimerTimeout API.

    Regards,
    Sid

  • I have fixed the function "ZDO_JoinIndicationCB". When "OsalPortTimers_getTimerTimeout" returns "0", my fixed program will detect if the "New Device List" is empty. When "New Device List" is empty, the timer for "ZDO_NEW_DEVICE" event should be started.

  • Hi Aries,

    Thank you for the update with the work around. I will file a ticket for this.

    Regards,

    Sid

  • I too can confirm that the incorrect return value looks to be returned.

    The simple fix is to check for zero and return 1 in that case after the division. This needs to be done by TI in the simplelink sdk.

  • Hi Mathew, 

    Thank you for the response. I will let RnD know in the ticket. 

    Regards,

    Sid