Deomid Ryabkov
Deomid Ryabkov
it is, actually. logging is thread-safe. the only problem is sometimes the task it's logging from doesn't have enough stack... *printf calls are quite expensive in terms of stack.
``` if (!xPortCanYield()) { /* In ISR Context */ if (mutex_type == queueQUEUE_TYPE_RECURSIVE_MUTEX) { abort(); /* recursive mutexes make no sense in ISR context */ } ``` code around line...
from ISR you can use mgos_cd_printf that will print to UART
yet, somehow xPortCanYield() ends up being false. is the trace always the same as above?
LOG is not meant to be used in ISR. On Tue 27 Oct 2020, 09:03 Tomas Mudrunka, wrote: > BTW what is expected behaviour of LOG() in ISR? It should...
i bet it can. `mgos_ints_disable()` translates to `portENTER_CRITICAL` on freertos, you shouldn't be logging from inside a critical section.
well, there are a lot of things you shouldn't be doing with ints disabled, logging is just one fo them - in fact, the set of thinjgs you can safely...
@nliviu thanks for reporting, fixed by https://github.com/mongoose-os-libs/i2c/commit/d01074bf3c125449d87c508ea1a5bfa27c03c9d9
ugh... another case where using wall time for timers hurts. we should really switch to uptime! ok, point taken.
pushed the uptime change. try now, it should fix the issue.