Page 1 of 1
Reading single bytes from Flash
Posted: Tue Nov 22, 2016 10:58 am
by jumjum123
In my application I've to read single bytes from Flash.
spi_flash_read returns an error if len is set to 1
Is there a better way than reading 4 bytes and masking one of them ?
Re: Reading single bytes from Flash
Posted: Tue Nov 22, 2016 2:53 pm
by ESP_igrr
We will fix this limitation of spi_flash_* APIs at some point after 1.0. But internally this will be implemented as a four-byte read which discards unneeded bytes. I don't know of any way to do this without reading at least 4 bytes from flash.
Re: Reading single bytes from Flash
Posted: Tue Nov 22, 2016 3:33 pm
by jumjum123
Thanks a lot for this information.
At least this answer makes me feel better, since the fault is not between my ears