You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using the CONFIG_SPI_NOR_SFDP_RUNTIME configuration, by reading out the SFDP, the parameter nph is wrong interpreted.
A value of 0 means 1 parameter headers
So on my flash, where i get a 0 for nph, the flash layouting failed.
The JEDEC Standard No. 216 says:
Number of Parameter Headers (NPH)
Specifies the number of parameter headers in the SFDP data structure.
This number is 0-based. Therefore, 0 indicates 1 parameter header.
This number must be revised by a vendor or JEDEC when a new parameter header is
added
Describe the bug
Using the CONFIG_SPI_NOR_SFDP_RUNTIME configuration, by reading out the SFDP, the parameter nph is wrong interpreted.
A value of 0 means 1 parameter headers
So on my flash, where i get a 0 for nph, the flash layouting failed.
code (spi_nor.c) :
const struct jesd216_param_header *phpe = php + MIN(decl_nph, hp->nph);
proposal to fix:
const struct jesd216_param_header *phpe = php + MIN(decl_nph, hp->nph+1);
The JEDEC Standard No. 216 says:
Number of Parameter Headers (NPH)
Specifies the number of parameter headers in the SFDP data structure.
This number is 0-based. Therefore, 0 indicates 1 parameter header.
This number must be revised by a vendor or JEDEC when a new parameter header is
added
To Reproduce
Steps to reproduce the behavior:
[00:00:00.003,000] <err> spi_nor: layout setup failed: -134
Expected behavior
Flash setup successful.
Impact
Useing CONFIG_SPI_NOR_SFDP_MINIMAL
Logs and console output
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: