MultiCore: SPI, Timer, ESPNOW, and File System
Posted: Wed Apr 17, 2024 5:26 pm
Hello Espressif Community,
I'm developing an application that must update a LED matrix. In parallel, the application is also responsible for receiving data packets via ESPNOW, saving them to FLASH, and updating the graphical information on the LED matrix.
Basically, the LED matrix was developed with arrays of shift registers controlled via SPI (CPU_1), and the rest (such as ESPNOW, File System, etc.) is handled by (CPU-0).
Between SPI writes, there's a timing of 200us controlled by the timer [High Resolution Timer - One Shot Timer]:
Write SPI DMA -> Start Timer One Shot (200uS) -> Timer Interrupt -> Write SPI DMA -> Start Timer One Shot (200uS) -> Timer Interrupt -> ...
The problem is that when I receive a packet via ESPNOW on CPU_0, CPU_1 also becomes blocked. This affects the LED matrix, causing flickering on the screen.
How can I make CPU-1 completely independent of CPU-0?
I'm developing an application that must update a LED matrix. In parallel, the application is also responsible for receiving data packets via ESPNOW, saving them to FLASH, and updating the graphical information on the LED matrix.
Basically, the LED matrix was developed with arrays of shift registers controlled via SPI (CPU_1), and the rest (such as ESPNOW, File System, etc.) is handled by (CPU-0).
Between SPI writes, there's a timing of 200us controlled by the timer [High Resolution Timer - One Shot Timer]:
Write SPI DMA -> Start Timer One Shot (200uS) -> Timer Interrupt -> Write SPI DMA -> Start Timer One Shot (200uS) -> Timer Interrupt -> ...
The problem is that when I receive a packet via ESPNOW on CPU_0, CPU_1 also becomes blocked. This affects the LED matrix, causing flickering on the screen.
How can I make CPU-1 completely independent of CPU-0?