Tried to block on mutex from ISR....

Fredckx
Posts: 17
Joined: Mon Mar 29, 2021 8:55 pm

Tried to block on mutex from ISR....

Postby Fredckx » Wed Sep 15, 2021 10:06 am

Hi, I get a runtime error "lock_acquire_generic at .....". The ESP-IDF system suggests: Tried to block on mutex from ISR, couldn't ....
rewrite your program to avoid libc interactions in ISRs!

Is there a way to identify the conflicting parts of the code?

I have the backtrace information on my screen.

Thanks !
Fred

Fredckx
Posts: 17
Joined: Mon Mar 29, 2021 8:55 pm

Re: Tried to block on mutex from ISR....

Postby Fredckx » Wed Sep 15, 2021 10:29 am

The post mortem screendump points at lines of code where Float/Real is involved.

I've read the following in ESP-IDF specficifics for freeRTOS:

Floating Point Arithmetic: The ESP32 supports hardware acceleration of single precision floating point arithmetic (float). However the use of hardware acceleration leads to some behavioral restrictions in ESP-IDF FreeRTOS. Therefore, tasks that utilize float will automatically be pinned to a core if not done so already. Furthermore, float cannot be used in interrupt service routines.

Who is online

Users browsing this forum: No registered users and 179 guests