WiFi getting slow if using SPI on other core
Posted: Sat Feb 01, 2020 1:48 pm
Hi everyone,
I try to read data from an external ADC and send it via WiFi to my computer. Because of 16-bit resolution and 10 kHz sampling rate I get 1.6 Mbit/s of data to send.
The SPI reading happens in an ISR, which is always on core 1. For this reason, the sending task is a FreeRTOS task pinned to Core 0.
If I don't use SPI for data reading, the WiFi speed is sufficient. But when I use SPI, the WiFi speed slows down to about 0.8 Mbit/s and my queue runs over.
Is it possible that the SPI driver or any other background process slows core 0 down so much?
Or can I force the ISR to run on Core 0, so I can swap the tasks?
Thanks in advance!
Best regards!
I try to read data from an external ADC and send it via WiFi to my computer. Because of 16-bit resolution and 10 kHz sampling rate I get 1.6 Mbit/s of data to send.
The SPI reading happens in an ISR, which is always on core 1. For this reason, the sending task is a FreeRTOS task pinned to Core 0.
If I don't use SPI for data reading, the WiFi speed is sufficient. But when I use SPI, the WiFi speed slows down to about 0.8 Mbit/s and my queue runs over.
Is it possible that the SPI driver or any other background process slows core 0 down so much?
Or can I force the ISR to run on Core 0, so I can swap the tasks?
Thanks in advance!
Best regards!