Hi there
Trying to drive an SPI display with a Particle Argon. The display refresh is painfully slow (taking about 2 seconds to refresh 240 lines). To investigate, I wrote a simple program sending data over the SPI port:
#define BLUE_LED D7
// setup() runs once, when the device is first turned on.
void setup() {
// Put initialization like pinMode and begin functions here.
pinMode (BLUE_LED, OUTPUT);
SPI.begin();
}
void loop() {
SPI.beginTransaction(SPISettings(16000000, MSBFIRST, SPI_MODE0));
for (int i=32; i<96; i++){
SPI.transfer(i);
}
SPI.endTransaction();
}
I can see the bursts of SPI transfer (8-bit) in the scope measuring less than 1 microsecond, but then pausing for about 12 microseconds before the next byte is transferred.
Can this be improved? I know there’s the possibility of using DMA to transfer but it comes with its complications and I would have to start modifying the display library, which I’d prefer not to do.
I also tried using SINGLE_THREADED_BLOCK(){} but no difference.
Any suggestions out there?