From time to time, the RT106x-based embedded device I'm working on has to save fat blobs of data out to a QSPI (e.g. on PortB1). To do this, you'd normally:
However, this involves a lot of CPU fussing around (e.g. making up and sending out three packets), when the device has a lot of other real-time stuff it would rather be doing.
Is there a smart way to (mostly) integrate these into a single composite command, e.g. replacing the status register polling with some kind of dummy wait? I'm thinking of something along the lines of:
All/any suggestions/hints/tips gratefully received!
Cheers, Nick Pelling
Solved! Go to Solution.
Hi @np ,
About the DMA, you can refer to the flexSPI DMA code:
SDK_2.9.2_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor\edma_transfer
But to the combine a WRITE_ENABLE and a READ_STATUS into a single LUT entry, we didn't use it like that, normally, we still wait the WRITE_ENABLE is succeed, then do the detail operation, then call flexspi_nor_wait_bus_busy.
If you still want to check the combined situation, I think you can test it on your side, but it is not confirmed work.
Wish it helps you!
Best Regards,
kerry
Hi Kerry,
Yes, that is indeed the proper way of doing it (as I said in my question). But you must admit that it is quite indirect, especially considering that the recommendation I've seen here is to have interrupts disabled while you're doing it if you want to write stuff out to a second QSPI on a RT1061. Hence my concern is that this will slow down the device's response to interrupts etc.
I guess another alternative might be to wrap all these stages up in an eDMA sequence, though I haven't seen anyone actually do this. You could even prepare a series of 256-byte page writes and get the eDMA to trigger an interrupt on completion, decoupling this from the CPU.
Thanks, Nick
Perhaps it might be sensible to combine a WRITE_ENABLE and a READ_STATUS into a single LUT entry? Could that work?
Hi @np ,
About the DMA, you can refer to the flexSPI DMA code:
SDK_2.9.2_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\flexspi\nor\edma_transfer
But to the combine a WRITE_ENABLE and a READ_STATUS into a single LUT entry, we didn't use it like that, normally, we still wait the WRITE_ENABLE is succeed, then do the detail operation, then call flexspi_nor_wait_bus_busy.
If you still want to check the combined situation, I think you can test it on your side, but it is not confirmed work.
Wish it helps you!
Best Regards,
kerry
Hi np,
It's better still divide it as the SDK method, as just when the first operation success, then it can go the next step.
Eg, in the flexspi_nor_flash_program.
It needs to write enable, after it returns success, it can go to the next page program command, and after the page program command success, then it goes to the flexspi_nor_wait_bus_busy.
So, to the flexSPI operation, still refer to the SDK code method.
Wish it helps you!
Best Regards,
Kerry