Search found 4 matches

by Viento
Wed Jul 27, 2022 5:18 pm
Forum: ESP32 Arduino
Topic: Way to reduce the SPI buffer size.
Replies: 7
Views: 3852

Re: Way to reduce the SPI buffer size.

Well, looks like i made it with timer interrupt and xTaskResumeFromISR(xHandle). Method seems to work stably. Commands are parsed every 100µs, a 4kb buffer is filling in between. The time gap should be enough with a margin. Also, I don't understand your 'double-buffer' comment? The amount of element...
by Viento
Tue Jul 26, 2022 9:16 pm
Forum: ESP32 Arduino
Topic: Way to reduce the SPI buffer size.
Replies: 7
Views: 3852

Re: Way to reduce the SPI buffer size.

Ok, I did it using RTOS. (Ring buffer not suitable, need double buffer.) Next problem: RTOS is too slow. Tasks are called no more than 1 time per millisecond. Even with the setting "#define CONFIG_FREERTOS_HZ 10000". I used vTaskDelay(1) to have 100µs between tasks, but it is still 1000µs. Any way t...
by Viento
Fri Jul 22, 2022 7:54 am
Forum: ESP32 Arduino
Topic: Way to reduce the SPI buffer size.
Replies: 7
Views: 3852

Re: Way to reduce the SPI buffer size.

The max transfer size only influences the amount of DMA descriptors that are allocated; it does not affect whatever the SD library uses them for. Any chance through modifying SD library? (Although I did not find anything in the library mechanisms that could limit DMA.) I'm not sure how you'd do tha...
by Viento
Thu Jul 21, 2022 1:06 pm
Forum: ESP32 Arduino
Topic: Way to reduce the SPI buffer size.
Replies: 7
Views: 3852

Way to reduce the SPI buffer size.

Hello. In my project, the parser reads the G-code from the SD card through the SPI interface, using a usual SD.h library. The problem is that regardless of the size of the SD card buffer, the SPI reads 4092 bytes every time, puts them in the DMA buffer, and reads the next 4092 only when the buffer i...