Timers not stopping | Thales IoT Developer Community
April 18, 2022 - 3:59pm, 233 views
The APIs for creating, starting, and stopping timers are not working.
The APIs I am using follows this basic structure found in this documentation: https://github.com/Thalhammer/simcom_dam/blob/master/api/include/qapi/qa...
Which is basically this code (from the link above):
qapi_TIMER_handle_t timer_handle; qapi_TIMER_def_attr_t timer_def_attr; timer_def_attr.cb_type = TIMER_FUNC1_CB_TYPE; //notification type timer_def_attr.sigs_func_ptr = &timer_test_cb; //callback to call when timer expires timer_def_attr.sigs_mask_data = 0x1; //this data will be returned in the callback timer_def_attr.deferrable = false; //set to true for non-deferrable timer qapi_Timer_def( &timer_handle, &timer_def_attr); qapi_TIMER_set_attr_t timer_set_attr; timer_set_attr.reload = FALSE; //Do not restart timer after it expires timer_set_attr.time = time_duration; timer_set_attr.unit = T_MSEC; //set or start the timer qapi_Timer_set( timer_handle, &timer_set_attr); //stop a running timer qapi_Timer_stop( timer_handle); //Undef the timer. Releases memory allocated in qapi_Timer_Def() qapi_Timer_undef( timer_handle);
I did some tests and what is happening is that the timer is not being stopped, that is, it keeps expiring, and printing the message on the callback I have registered.
The SDK I am using is for the EXS82-W module.
SDK Version (according to the SDK_Release_Note.pdf) is 0.2.002