Option to disable HAL mutexes

the-fallen
Posts: 2
Joined: Wed Nov 23, 2016 9:49 pm

Option to disable HAL mutexes

Postby the-fallen » Wed Nov 23, 2016 10:11 pm

Hi there. I stumbled upon HAL mutex locks while trying to find out why a certain LCD driver is so slow in the ESP32.

I think I understand what they are good for.

Google told me that me-no-dev committed this change :
https://github.com/espressif/arduino-es ... 9fd0b62419

And it seems that there now is an option to disable those mutexes.

Now I wonder how to use that option in Arduino correctly (I already disabled SPI HAL mutexes by changing esp32-hal-spi but I am sure thats not the way I should do that).

And just for understanding: do I need to take care oft something if I disable those mutexes?

Many thanks in advance.

User avatar
ESP_Me-no-dev
Posts: 77
Joined: Mon Jan 04, 2016 6:30 pm

Re: Option to disable HAL mutexes

Postby ESP_Me-no-dev » Fri Dec 02, 2016 2:05 pm

you should disable mutextes by changing the option in tools/sdk/include/config/sdkconfig.h which is generated by menuconfig when libs are prepared in IDF. I will add it as option to the boards soon also.
If you use Arduino the usual way and do not spawn threads or run code on both cores at the same time that accesses the same peripheral, you should be safe without mutexes. If you want to use threads, make sure that SPI for example is accessed only in that thread.

Who is online

Users browsing this forum: No registered users and 86 guests