External SPI Flash Memory + File System + NRF 52832

Hi,

I am trying to implement a lightweight file system in my external flash memory (ISSI). After the implementation of file system, I want to store a .bin file and later access the file through c program. I am a beginner in nrf52 board and need some assistance in understanding the implementation method for the above.

  1. I need some direction for implementing file system in nrf52832. I am using the following Software/Hardware tools:
  • nRF52832
  • NRF CONNECT SDK 2.5.1
  • SPI FLash Memory: IS25LP128-JBLE
  • vscode
  • Windows 11 64 bits

       2. I would also like to if I can implement FATFS on the SPI flash memory using the nrf 52832. Is there a link for the lastest version of FAT FS code.

       3. I need some help in understanding if I can use supported files from nrf SDK v 2.5.1 for nrf52832 board? IS there some alteration needed before I upload them to my nrf 52832 board.

Best,

AP

Parents
  • Will this work for nrf 52832 board?

    As I have gone through the document and for external flash : "This type of configuration requires external flash device to be available on DK board. Currently following boards support the configuration: nrf52840dk_nrf52840 by nrf52840dk_nrf52840_qspi configuration." . SInce I have a nrf 52832dk board it does not support this board right?

  • Hi,

    It looks like Device id does not match your configured id. I am referring to this line:



    Best regards,
    Dejan

  • Yes but isnt the device id 99 00 83 a junk value because of not detecting/getting the flash memory correct. If i change the jedec ifd to this value could it not have other error or flash the fs to wrong address or something.

  • Hi,

    Which clock frequency did you use?
    You could try to lower your clock frequency to 1 MHz or less.

    Did you show a whole transfer on your trace picture?

    Best regards,
    Dejan

  • Hi,

    CLk freqeuncy is 125khz ->min possible frequency (also tried 1Mhz). 

    Also changed the dpd enter and exit value to 3000 (3 us) as per datasheet:

    new trace: during flash there is only one event and this is the whole trace.

    Also changed the jedec id to the requested device id:

    The flash log is:

    I: littlefs partition at /lfs1
    I: LittleFS version 2.5, disk version 2.0
    E: fs mount error (-22)
    E: Automount /lfs1 failed: -22
    *** Booting nRF Connect SDK v2.5.0 ***
    Sample program to r/w files on littlefs
    Area 0 at 0xfeffa000 on flash-controller@4001e000 for 16777216 bytes
    /lfs1 automounted
    E: mount point not found!!
    FAIL: statvfs: -2
    E: fs not mounted (mp == 0x20000034)
    /lfs1 unmount: -22

    Should I use QPI instead of SPI for the issi flash? but since QPI is different from QSPI I wonder the configuration in the zephyr package will support this.

    The gpio pins (22,23,24,25) seems to be low power/frequency as per nrf52dk datasheet but the spi frequency for fast read is 133 Mhz. could this be the cause of the errors?

    Should I be change the configuration for the parameters specially "deep power down":

            spi-max-frequency = <125000>; /* Adjust based on your flash specifications 104mhz*/
            size = <0x8000000>; /* Adjust based on your fl ash size */
            has-dpd;
            t-enter-dpd = <3000>; //3000
            t-exit-dpd = <3000>; //30000

    "

    Br,

    AP

  • Hi,

    Prasad A said:
    The gpio pins (22,23,24,25) seems to be low power/frequency as per nrf52dk datasheet but the spi frequency for fast read is 133 Mhz. could this be the cause of the errors?

    Some gpio pins are recommended to be low power/frequency as they have internal bond wires routed close to the RADIO which can lead to poor radio performance. In other words, pins power/frequency might affect radio sensitivity. In addition, maximum SPI clock frequency is 8 MHz. 

    Your dpd values look correct, but pictures from logic analyzer do not look correct.

    Have you checked that you do not have any other peripheral that is assigned to/driving the same pins?

    Best regards,
    Dejan

Reply
  • Hi,

    Prasad A said:
    The gpio pins (22,23,24,25) seems to be low power/frequency as per nrf52dk datasheet but the spi frequency for fast read is 133 Mhz. could this be the cause of the errors?

    Some gpio pins are recommended to be low power/frequency as they have internal bond wires routed close to the RADIO which can lead to poor radio performance. In other words, pins power/frequency might affect radio sensitivity. In addition, maximum SPI clock frequency is 8 MHz. 

    Your dpd values look correct, but pictures from logic analyzer do not look correct.

    Have you checked that you do not have any other peripheral that is assigned to/driving the same pins?

    Best regards,
    Dejan

Children
Related