mirror of https://github.com/ARMmbed/mbed-os.git
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.pull/13848/head
parent
66c05ddbf8
commit
c61445a787
|
@ -18,7 +18,7 @@
|
|||
"QSPI_POLARITY_MODE": 0,
|
||||
"QSPI_FREQ": "40000000",
|
||||
"QSPI_MIN_READ_SIZE": "1",
|
||||
"QSPI_MIN_PROG_SIZE": "256"
|
||||
"QSPI_MIN_PROG_SIZE": "1"
|
||||
},
|
||||
"target_overrides": {
|
||||
"MX25R6435F": {
|
||||
|
@ -37,15 +37,18 @@
|
|||
"MCU_NRF52840": {
|
||||
"QSPI_FREQ": "32000000",
|
||||
"QSPI_MIN_READ_SIZE": "4",
|
||||
"QSPI_MIN_PROG_SIZE": "256"
|
||||
"QSPI_MIN_PROG_SIZE": "4"
|
||||
},
|
||||
"MCU_PSOC6": {
|
||||
"QSPI_FREQ": "50000000",
|
||||
"QSPI_MIN_PROG_SIZE": "512"
|
||||
"QSPI_FREQ": "50000000"
|
||||
},
|
||||
"EFM32GG11_STK3701": {
|
||||
"QSPI_MIN_READ_SIZE": "4",
|
||||
"QSPI_MIN_PROG_SIZE": "256"
|
||||
"QSPI_MIN_PROG_SIZE": "4"
|
||||
},
|
||||
"MCU_LPC546XX": {
|
||||
"QSPI_MIN_READ_SIZE": "4",
|
||||
"QSPI_MIN_PROG_SIZE": "4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue