SmartRC-CC1101-Driver-Lib icon indicating copy to clipboard operation
SmartRC-CC1101-Driver-Lib copied to clipboard

Use of SPI.transfer(buffer, len) in burst read and write functions

Open dwarning opened this issue 3 years ago • 1 comments

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?

dwarning avatar Jan 23 '22 20:01 dwarning

hi thanks for your message. I will check it and take it into account for the next update. regards

LSatan avatar Jan 25 '22 00:01 LSatan