Hello,
In hal_timer.c, in timer_remove_task(), there is an ASSERT(false) in the case where the task was not found to be removed.
Also in timer_add_task(), there is an ASSERT(false) in the case where the task already exists.
I think these asserts are mistakes (I'm wondering if someone left them in for debugging?): Timer_remove_task() should return with an error if the task was not found. Likewise, timer_add_task() should return with an error if the task already exists. Code exists for the proper error returns, but the assert prevents it from happening. If the user wants an assert for these conditions he can do it after the return. There are definitely cases where you do not want the asserts- maybe the timer already fired, or hasn't fired yet. These are valid conditions, not fatal errors.
Anyway, can we get these asserts removed in the next version?
I see this in AtmelStart generated code for atsamd21, atsame54 and atsame70.
Thanks!
Joe