Facing an issue when we are trying to mount a file system on external flash(M95P42) + nrf52840.

We are developing an application on nrf52840 and wanted to use M95P32 as external flash.

 

used below .overlay configuration to enable it on zephyr.

 

&mx25r64 {

   compatible = "nordic,qspi-nor";

   status = "okay";

   sck-frequency = <8000000>;

   writeoc = "pp";

   jedec-id = [ 20 00 16  ];

   readoc = "read4o";

   ppsize-512;

   size = <33554432>;

 

   partitions {

      compatible = "fixed-partitions";

      #address-cells = <1>;

      #size-cells = <1>;

      filesystem_partition2: partition@0 {

         status = "okay";

         label = "ext_fat_fs";

         reg = <0x00000000 0x00400000>; // 4MB for fat32

      };

   };

};

 

We attempted to mount an FS_FATFS filesystem, but the process is getting stuck at the fs_mount() function.

Found below details during the debug.

fs_mount function is waiting on a k_sem_take(), please find the function and file details below.

file path is :- C:\ncs\v2.6.1\zephyr\drivers\flash\nrf_qspi_nor.c

function name :- read_non_aligned()

screenshot:-

 

please help me to resolve this, let me know if you need more details.

Parents
  • Hello,

    I'm not sure if the nRF QSPI NOR driver will work with the module you're using. When I checked the datasheet of your module, it appears to be an SPI page-mode EEPROM. I believe you'll need to develop a custom driver for this module (if one is not already available in Zephyr).

    I also noticed that your device tree is currently pointing to &mx25r64, which is incorrect. The MX25R64 has a different JEDEC ID.

    Kind regards,
    Abhijith

Reply
  • Hello,

    I'm not sure if the nRF QSPI NOR driver will work with the module you're using. When I checked the datasheet of your module, it appears to be an SPI page-mode EEPROM. I believe you'll need to develop a custom driver for this module (if one is not already available in Zephyr).

    I also noticed that your device tree is currently pointing to &mx25r64, which is incorrect. The MX25R64 has a different JEDEC ID.

    Kind regards,
    Abhijith

Children
  • Thank you Abhijith for the quick response.

    I do have a driver to access the EEPROM device and I am able to read/write raw data into it. Could you please guide us how we can leverage this driver to create Partitions (like FATFS) and link it to Zephyr dts?.

    Also, thanks for pointing out the incorrect device name.