nrf5340 XIP with mx25l25645g

Hello, 

We are trying to get the XIP example working with a custom nrf5340 board with the mx25l25645g memory chip.
Using VSCode, 2.7.0 toolchain, 2.7.0 sdk  

The project builds successfully but gets stuck on checking image validity, never progresses any further and I have to kill the terminal. 

D_CP_APPLICATION_merged_domains.hex
[ #################### ] 10.330s | Erase file - Done erasing
[ #################### ] 1.162s | Program file - Done programming
[ #################### ] 1.177s | Verify file - Done verifying
[ #################### ] 0.035s | Check image validity - Finished
 

The pinout for the custom board exactly matches the development kit:

qspi_default: qspi_default {
        group1 {
            psels = <NRF_PSEL(QSPI_SCK, 0, 17)>,
                <NRF_PSEL(QSPI_IO0, 0, 13)>,
                <NRF_PSEL(QSPI_IO1, 0, 14)>,
                <NRF_PSEL(QSPI_IO2, 0, 15)>,
                <NRF_PSEL(QSPI_IO3, 0, 16)>,
                <NRF_PSEL(QSPI_CSN, 0, 18)>;
            nordic,drive-mode = <NRF_DRIVE_H0H1>;
        };
    };

I have defined qspi as follows following the mx25l25645g datasheet:

&qspi
{
    status = "okay";
    pinctrl-0 = <&qspi_default>;
    pinctrl-1 = <&qspi_sleep>;
    pinctrl-names = "default", "sleep";
    mx25l25: mx25l25645g@0
    {
        compatible = "nordic,qspi-nor";
        reg = < 0x0 >;
        writeoc = "pp4io";
        readoc = "read4io";
        sck-frequency = < 6000000 >;
        jedec-id = [ C2 20 19 ];
        sfdp-bfp = [ e5 20 fb ff  0f ff ff ff  44 eb 08 6b  08 3b 04 bb
                     fe ff ff ff  ff ff 00 ff  ff ff 44 eb  0c 20 0f 52
                     10 d8 00 ff  d6 59 dd 00  82 9f 03 db  44 03 67 38
                     30 b0 30 b0  f7 bd d5 5c  4a 9e 29 ff  f0 50 f9 85 ];
        size = < 0x10000000 >;
        quad-enable-requirements = "S1B6";
        has-dpd;
        t-enter-dpd = < 0x2710 >;
        t-exit-dpd = < 0x88b8 >;
        enter-4byte-addr = <0xb7>;
        address-size-32;
    };
};

With this definition we are able to read and write to the flash but are not able to use XIP. 
Any tips for solving this issue are appreciated, at this point I am out of ideas. 

Thanks you. 
Parents Reply Children
No Data
Related