문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top