pellepl / spiflash_driver

Hardware agnostic generic spi flash driver
MIT License
73 stars 27 forks source link

Aggregating SPI operations #4

Closed bragma closed 5 years ago

bragma commented 5 years ago

Hi, I am using your driver and I'd like to reduce the number of calls to the low level SPI driver. Do you foresee any problems in aggregating SPI operations into a single one? As an example, page program (write) actually performs: write enable, command + address, data (3 SPI operations). I'd like to try to change the driver to use a larger buffer and call the driver with a single SPI operation.

bragma commented 5 years ago

Auto answering to myself: no, it won't work. Most flash chips require CS to be driven high after each command sequence, so write enable can't be aggregated with program command, since a CS up/down cycle is require. Sorry for bothering you, I should have done my homework before asking.