-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NRF5x: QSPI SFDP read, min read/write implementation #9291
Conversation
Results from mbed greentea "components-storage-blockdevice-component_qspif-tests-block_device-qspif": mbedgt: greentea test automation tool ver. 1.4.0 |
@j3hill - added a few remarks to the code. Adding: @dannybenor |
@maciejbocianski - Offir asked (above) if we tested with data on non-4-byte aligned addresses. Does the Greentea "components-storage-blockdevice-component_qspif-tests-block_device-qspif" test do this? It looks as though it generates random addresses for some of the tests, and I would think that some of them are non-4-byte aligned... but since they are random, we don't really know. Should we explicitly test non-aligned addresses, based on the minimum read/write size for a given device? |
Added a check for valid QSPI SFDP data. nRF52840-Preview-DK boards do not support QSPI SFDP reads, but production nRF52840 chipsets do support them with the workarounds implemented here. |
Actually I wrote this test, it checks random addresses, but all are aligned to sector size (4096 in this case). I'll run a small test on my env with this PR and update.. |
@j3hill - Running the same test you ran on NRF52840_DK on remote RAAS fails on SFDP data validation, so I can not check unaligned read/write , you can do a small test that writes/reads 4 bytes to unaligned address. Also, why did RAAS test failed, is it because it has nRF52840-Preview-DK boards? if so will CI not fail tests as well? |
@offirko I just sent an email to verify that we are using production nRF52840 DK boards for testing. Please also note that the bootloader must also use QSPIF and not SPIF. If the bootloader initializes/uses the same pins as SPIF, the application will not be able to initialize/use them as QSPIF. We are now trying to determine if this is a nRF52840 chipset limitation, or a SPI/QSPI software class constructor/destructor issue. |
Verified functionality on NRF52840_DK production board and a custom board with a production chip. Preview boards will get an error as expected. @cmonr is there anything blocking a merge? |
@dlfryar Reviews by @offirko @donatieng @marcuschangarm and @maciejbocianski |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Should be ok to merge once @j3hill and @VeliMattiLahtela confirm
that "preview" boards in CI have been replaced
Travis restarted (fetch package issues) |
Even though @marcuschangarm is listed as reviewer, he is not an approved merger. Is there someone in the reviewer list that can merge after approving? |
replaced? was it done? @offirko can you provide more info what we are waiting for? @elm3 I'll review shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small request for better clarity in the bugfix: The commit for nrf5x but changing also QSPI block device, I would split it into two commits
- fixing nrf51x qspi read
- QSPI block device min read/prog size set via config
@j3hill Can you split the commit as requested above? |
@0xc0170 The commits for this PR have been split as requested. The first commit updates the QSPIF min read/write implementation. The second commit implements SFDP reads for the nRF52840. |
@VeliMattiLahtela has confirmed that all of the "preview" boards have been replaced. |
CI started |
Test run: SUCCESSSummary: 12 of 12 test jobs passed |
Description
In "targets\TARGET_NORDIC\TARGET_NRF5x\qspi_hal.c", add private helper function to the read QSPI SFDP data during initialization. Add support for Nordic QSPI custom instruction long frame mode in "targets\TARGET_NORDIC\TARGET_NRF5x\TARGET_SDK_14_2\drivers_nrf\qspi\nrf_drv_qspi.c/.h"
Add support for "QSPIF" component to MCU_NRF52840 in targets.json. Add support for "QSPI_MIN_READ_SIZE" and "QSPI_MIN_PROG_SIZE" for specific targets as defined in: "components\storage\blockdevice\COMPONENT_QSPIF\mbed-lib.json." Return these minimum read/write sizes for specific targets in QSPIFBlockDevice.
Pull request type