This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Concurrently using XIP and QSPI to read back data from external flash

Dear Nordic,

I have a 4MB external flash on my board, I've successfully run the code on it by using XIP. However, I got stuck when I was trying to read back data from external flash. The following picture has the call stack trace. It's a failure of NRFX_ASSERT.

Some more details:

Using nrfx driver both in bootloader and application is not a good idea, because the driver status is stored in the different RAM area. I add a fake initialization function for QSPI to keep the peripheral status consistent. Do you have any better ideas?

Best Regards,

Eugene

Parents
  • haakonsh said:
    If the IRQ for the QSPI is in internal flash you wont have any problems with interrupts of higher priority as the CPU will return to the internal flash to finish proccessing the IRQ or driver before returning to XiP. 

     Sorry, I don't understand why it is safe without disabling all interrupts, QSPI interrupt occurs when DMA transfer is finished, but when it is transferring, if some interrupt comes, for example, Systick, the Systick interrupt handler is in the external flash, then MCU crashes.

    As per my understanding, we have to use block send for QSPI and disable all interrupts during data transfer. Does it make sense?

Reply
  • haakonsh said:
    If the IRQ for the QSPI is in internal flash you wont have any problems with interrupts of higher priority as the CPU will return to the internal flash to finish proccessing the IRQ or driver before returning to XiP. 

     Sorry, I don't understand why it is safe without disabling all interrupts, QSPI interrupt occurs when DMA transfer is finished, but when it is transferring, if some interrupt comes, for example, Systick, the Systick interrupt handler is in the external flash, then MCU crashes.

    As per my understanding, we have to use block send for QSPI and disable all interrupts during data transfer. Does it make sense?

Children
No Data
Related