Brutkey

Nick Poole
@North@chaos.social

Anyone with FreeRTOS knowledge know why I would be seeing occasional delays (in the 10s of microseconds) in starting a SPI transfer on esp32? It's usually the first of several consecutive transactions after not accessing it for a millisecond or so.


Nick Poole
@North@chaos.social

I'm using the Arduino SPI bindings, but I'm not calling beginTransaction() or endTransaction() because the mutex is expensive and unnecessary, only one function ever accesses the SPI. I only call beginTransaction() at startup. I am manually toggling the CS pins, but that should not create the sporadic delay I'm seeing. Should I talk to the SPI Master driver directly? Can I give the SPI driver a core affinity and would it help to pin it to the core where the function that calls it is pinned?