<re_irc>
<gauteh> Hi. I think I'm experiencing a deadlock in my panic handler. It's custom, but does some defmt printing (https://github.com/gauteh/sfy/blob/main/sfy-buoy/sfy-artemis/src/main.rs#L437). Seems like defmt-rtt is using critical-section 0.2.7. Is there anything that can cause critical-section vs defmt-rtt to deadlock on cortex-m? defmt has to work inside a critical section (cortex-m interrupt free).. and from interrupts.. Or is...
<re_irc>
... it maybe more likely that there's another panic triggered that causes a panic loop?
<re_irc>
<gauteh> This is a backtrace from a gdb session I attached to a locked up device:
<re_irc>
(gdb) where
<re_irc>
#0 critical_section::_critical_section_acquire () at src/lib.rs:111
<re_irc>
#1 0x0003bcb0 in critical_section::acquire () at src/lib.rs:46
<re_irc>
<gauteh> Maybe related to: https://docs.rs/cortex-m/latest/cortex_m/interrupt/fn.enable.html, this means I cannot call critical_section::acquire inside a free(|cs| ..) closure. And thus cannot call defmt::* from within free, since defmt-rtt does acquire ?
<re_irc>
<Leandro Marceddu> What would be a way to make a ping every minute?
<re_irc>
<Leandro Marceddu> Would I best use a timer for this, set it to a minute, capture the trigger and reset it again? Or would I rather use a now() < 1minute_in_future sort of thing?