SmartRC-CC1101-Driver-Lib
SmartRC-CC1101-Driver-Lib copied to clipboard
Use of SPI.transfer(buffer, len) in burst read and write functions
We have a timing sensitive application and see about 8us between byte access in the SpiReadBurstReg function. This happens with ESP32 and default SPI clock 1MHz. Rising the clock has not large effect.
The reason is the loop in SpiReadBurstReg:
for(i=0;i<num;i++) { buffer[i]=SPI.transfer(0); }
Substitute the loop by
SPI.transfer((uint8_t *) buffer, (uint32_t) num);
will reduce the time gap dramatically.
What speaks against this proposal?
hi thanks for your message. I will check it and take it into account for the next update. regards