Has anyone (tried to) simultaneously use the same QSPI Flash memory directly from an nRF52840 program and as a USB block device?
We have both functions running in the same hardware when used alternatively: can either read/write the QSPI memory with nrf_drv_qspi_init(), nrfx_qspi_read() and nrfx_qspi_write or disable that and use the same memory as a USB MSC block device with NRF_BLOCK_DEV_QSPI_DEFINE(), etc.
I'm trying to figure out if it is worth the effort to try to combine these. Probably should
- Let the block device library initialize the QSPI and the flash memory
- Starting read/write operations (externally to the block device) could be quite simple - may need to fetch come pointer from inside the block device library
- Should add a flag showing if a read/write is from "our app" or "block device", modify the QSPI event handler to pass the read/write results accordingly either to the block device library or to our own code.
I suppose this is not possible without modifying the block device library code? But the modifications needed might be reasonably small?
Setup: nRF52840 on our own board, MX25R6435F, SDK16.0, SoftDevice 7.0.1, FreeRTOS.
Pertti