Stable period timer

alb702
Posts: 7
Joined: Tue Dec 07, 2021 3:31 am

Stable period timer

Postby alb702 » Wed Jan 26, 2022 5:20 am

Hello. This question as addition to previous post.

I'm use ESP IDF Master branch on ESP32C3.

My application have led indicator with dynamic scan. Leds are on shift register, which connected
to ESP32 SPI2. Leds control array size 4 bytes, update time on SPI about 15 us. Update period 1000 us.
Update called from task cycle, included vTaskDelay(1 / portTICK_PERIOD_MS). SPI transfer function
is IRAM_ATTR.
It work.

But when i run other task, which download file from Wifi network and store it to SPIFFS partition, leds are "blinking". It mean, update period became unstable. I'm try to set high priority of led task(5), or call leds update from timer interrupt ISR, but no success. Always "blinking".

Download task consist of two action: recevie packet (size=512 bytes) from network and store data to file. Critical in my case is writting to file.

What a workaroud? File download is backgound task, may be low priority.

-----------------
My config items:

FreeRTOS tick rate : 1000
--
SPI Flash driver
[ ] Verify SPI Flash writes
[*] Enable yeld operations during flash erase
(8192) Flash write chunk size

SPIFFS:
[*] Enable SPIFFS page check

[*] Enable SPIFFS cache
[*] Enable SPIFFS Write Caching
[ ] Enable SPIFFS Cache statistic

Who is online

Users browsing this forum: No registered users and 50 guests