Pregunta

I have a Raspberry Pi Model B, and I'm using SPIDev in python 2.7.

I'm writing a stream of bytes out of the SPI port and I see them and they are well formed, but there seems to be excessive (~4ms) delays between each byte. This appears to be causing trouble in device I'm writing to.

The delay is consistent across data rates, and happens whether I use spidev.writebytes() or spidev.xfer2() functions

Is this caused by other linux processes being serviced? Something in the SPIDev driver?

Has anyone else experience this, and/or know of a solution?

¿Fue útil?

Solución

It turns out there was a variety of contributing factors involved, essnetially I was processing and preparing data as I was writing it to the SPI port. When I rearranged the code so the data was all prepared ahead and the writes were done back-to-back, everything works as fast as I would expect.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top