nRF54L15 + MCUboot + mx25r64 with SQSPI : Failed to open flash area on mx25r64.

Hello

I  tried to test OTA function with smp_svr example.

I want to use the external flash mx25r64 on nrf54l15-dk(v0.9.3) to store update Firmware over BLE.  SDK version 3.2.0 was used.

The driver and dts for mcuboot was configured with "sysbuild\mcuboot.conf", "sysbuild\mcuboot.overlay".

partitions manager was used with "pm_static.yml".

Before mcuboot start, mspi and flash driver was loaded correctly. 

Then mcuboot to read seconed image slot on external flash failed. could you give some advice for this issue?

The source code is attached below.

2046.smp_svr.zip

  • Hi,

    I was able to reproduce the same here and it turns it was the same problem reported in this thread: nRF54L15 + MCUboot + External flash with SQSPI: VPR problems causing the application code to hang on startup. However, patching the sqspi driver as suggested in that thread did not work for me. Instead I had to modify the bootloader code to reset VPR before branching to the app:

    diff --git a/boot/zephyr/nrf_cleanup.c b/boot/zephyr/nrf_cleanup.c
    index c1e5a178..e7f49289 100644
    --- a/boot/zephyr/nrf_cleanup.c
    +++ b/boot/zephyr/nrf_cleanup.c
    @@ -22,6 +22,11 @@
     #if defined(NRF_DPPIC)
         #include <hal/nrf_dppi.h>
     #endif
    +#if defined(CONFIG_MSPI_NRF_SQSPI)
    +    #include <hal/nrf_vpr.h>
    +    #include <../../nrfxlib/softperipheral/include/softperipheral_regif.h>
    +#endif
    +
     
     #include <string.h>
     
    @@ -111,6 +116,24 @@ static void nrf_cleanup_clock(void)
     }
     #endif
     
    +#if defined(CONFIG_MSPI_NRF_SQSPI)
    +static void nrf_cleanup_sqspi(void) 
    +{
    +    nrf_vpr_cpurun_set(NRF_VPR, false);
    +
    +    // Reset VPR.
    +    nrf_vpr_debugif_dmcontrol_mask_set(NRF_VPR,
    +                                       (VPR_DEBUGIF_DMCONTROL_NDMRESET_Active
    +                                        << VPR_DEBUGIF_DMCONTROL_NDMRESET_Pos |
    +                                        VPR_DEBUGIF_DMCONTROL_DMACTIVE_Enabled
    +                                        << VPR_DEBUGIF_DMCONTROL_DMACTIVE_Pos));
    +    nrf_vpr_debugif_dmcontrol_mask_set(NRF_VPR,
    +                                       (VPR_DEBUGIF_DMCONTROL_NDMRESET_Inactive
    +                                        << VPR_DEBUGIF_DMCONTROL_NDMRESET_Pos |
    +                                        VPR_DEBUGIF_DMCONTROL_DMACTIVE_Disabled
    +                                        << VPR_DEBUGIF_DMCONTROL_DMACTIVE_Pos));
    +}
    +#endif
     void nrf_cleanup_peripheral(void)
     {
     #if defined(NRF_RTC0)
    @@ -123,6 +146,10 @@ void nrf_cleanup_peripheral(void)
         nrf_cleanup_rtc(NRF_RTC2);
     #endif
     
    +#if defined(CONFIG_MSPI_NRF_SQSPI)
    +    nrf_cleanup_sqspi();
    +#endif 
    +
     #if defined(CONFIG_NRF_GRTC_TIMER)
         nrf_cleanup_grtc();
     #endif
    
     

    Could you please try applying the the same change on your end?

  • Thanks for confirming that it worked. I have reported the issues found here internally so we can improve the sQSPI support in the bootloader.

Related