pixelmatix / SmartMatrix

SmartMatrix Library for Teensy 3, Teensy 4, and ESP32
http://docs.pixelmatix.com/SmartMatrix
611 stars 161 forks source link

teensylc branch/esp32 - calcTask() sometimes runs on core 0 and has lower refresh rate #102

Closed liebman closed 3 years ago

liebman commented 4 years ago

calcTask() is created with "xTaskCreate" this means it can run on either core. If it runs on core 0 it competes with wifi and has a slower refresh rate, in my case 48 fps instead of 71 fps.

https://github.com/pixelmatix/SmartMatrix/blob/ebf12e4fa3d212ded543970450ad4bc1742ad3fd/src/SmartMatrixMultiplexedCalcEsp32_Impl.h#L311

Instead the core should be select-able at run time or compile time using xTaskCreatePinnedToCore.