File System for RAK15001 external flash memory

I am using the external flash memory module and would like to deploy a file system over it. The original repo of this module (GitHub - adafruit/Adafruit_SPIFlash) has examples for that.

However , I am unable to use those examples for the flash memory module (RAK4631 + RAK5005). I don’t know if those examples should even work because they are meant for Adafruit’s M0 express board which is based on Atmega.

But the repo lists support for the Adafruit’s nRF52 arduino core on which RAK4631’s codebase is based.

Hello @rommel

The Adafruit library will work with the RAK15001.
We have a Quick Start Guide and example code using the Adafruit SPI Flash library.
Both the tutorial and the example are not using the file system, but it should be not difficult to adapt one of Adafruits examples.

The important point is that you have to tell the Adafruit library the details of the flash chip, which you can find in the example:

SPIFlash_Device_t g_RAK15001{    
  .total_size = (1UL << 21), 
  .start_up_time_us = 5000,
  .manufacturer_id = 0xc8,  
  .memory_type = 0x40, 
  .capacity = 0x15,  
  .max_clock_speed_mhz = 15,
  .quad_enable_bit_mask = 0x00, 
  .has_sector_protection = false, 
  .supports_fast_read = true, 
  .supports_qspi = false,             
  .supports_qspi_writes = false, 
  .write_status_register_split = false,  
  .single_status_byte = true,                       
};  //Flash definition structure for GD25Q16C Flash

which is then used in the initialization

if (!g_flash.begin(&g_RAK15001))
1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.