smartknob-ha / firmware

smartknob firmware, esp-idf based instead of tasmota
GNU Affero General Public License v3.0
2 stars 1 forks source link

Pin default pthreads core #41

Open SquaredPotato opened 4 months ago

SquaredPotato commented 4 months ago

We can use menuconfig to set CONFIG_PTHREAD_DEFAULT_CORE_0=y or CONFIG_PTHREAD_DEFAULT_CORE_1=y. This setting should then be used in combination with https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/pthread.html#_CPPv430esp_pthread_get_default_configv and https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/pthread.html#_CPPv417esp_pthread_cfg_t to spawn non-display threads on the correct core. This method is also used by ESPP to pick what core it uses for various threads it uses, for example the haptics foc loop.

For us this may apply in

list may not be complete by the time we get around to this