QSPIFBlockDevice: fix misconception in minimum program size
Prior to this PR, the minimum program size (QSPI_MIN_PROG_SIZE) of
QSPIFBlockDevice was 256 by default and 512 for some targets.
Those values were in fact page sizes, not program sizes.

Here's an explanation:
* Most QSPI flashes can be programmed to a granularity of a
  single byte or a few bytes - no need to be a whole page.
  This should be the value of QSPI_MIN_PROG_SIZE. Applications
  need to align buffer sizes to this granularity when
  programming QSPI flashes.
* Each sending of the underlying QSPI program signal requires
  destination bytes to be located within the same page.
  If a QSPIFBlockDevice::program() call crosses page boundaries,
  this function breaks down the operation into multiple chunks,
  so it's not a concern for the application.

So this PR changes the default program size to 1 (byte), and
for targets with a 4-byte (1-word) read size it overrides the
program size.

Note: No config is needed for the page size, as it comes from
the SFDP table parsed during initialisation.
ls
1 parent 66c05dd commit c61445a7874175da17fcc7ceccfcd5a8f67385b6
@Lingkai Dong Lingkai Dong authored on 3 Nov 2020
Showing 1 changed file
View
storage/blockdevice/COMPONENT_QSPIF/mbed_lib.json