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
  • Hi again Eugene, 

    After consult with our R&D we have basically two issues: 

    - Our earlier information on devzone was wrong, it's not possible to execute code in XIP that can access QSPI flash storage. If you are accessing to memory using XIP, and want to use standard EasyDMA communication, you have to re-init QSPI. 

    - There is a bug after accessing XIP that you would need to trigger a TASKS_ACTIVATE before you re-init QSPI. Otherwise the CPU will hang. 

    Basically you would need to stop accessing XIP and then calling 

    NRF_QSPI->EVENTS_READY = 0;
    NRF_QSPI->TASKS_ACTIVATE = 1;
    while(NRF_QSPI->EVENTS_READY == 0) {};
    before accessing to QSPI flash data. After that you can go back to XIP. 
     
Reply
  • Hi again Eugene, 

    After consult with our R&D we have basically two issues: 

    - Our earlier information on devzone was wrong, it's not possible to execute code in XIP that can access QSPI flash storage. If you are accessing to memory using XIP, and want to use standard EasyDMA communication, you have to re-init QSPI. 

    - There is a bug after accessing XIP that you would need to trigger a TASKS_ACTIVATE before you re-init QSPI. Otherwise the CPU will hang. 

    Basically you would need to stop accessing XIP and then calling 

    NRF_QSPI->EVENTS_READY = 0;
    NRF_QSPI->TASKS_ACTIVATE = 1;
    while(NRF_QSPI->EVENTS_READY == 0) {};
    before accessing to QSPI flash data. After that you can go back to XIP. 
     
Children
No Data
Related