Trouble initialising SPI flash RAK15001

I’m integrating SPI flash into my prototype and have hit an issue where the RAK15001 module is not being detected.

System: 19011 Dual IO base with power module, 11200 Core, 15001 storage

I am using UART-UART serial comms to read data coming from another device and this is connected to TXD1 and RXD1 exposed on J18. I also am using IO5 to read a couple of DS18B20 digital temperature probes.

If I load the example sketch RAK15001_Flash_GD25Q16C.ino and run it, I get a core panic LoadProhibited:

11:07:13.985 -> =====================================
11:07:14.017 -> RAK15001 GD25Q16C Flash test
11:07:14.017 -> =====================================
11:07:14.017 -> Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
11:07:14.017 -> 
11:07:14.017 -> Core  1 register dump:
11:07:14.017 -> PC      : 0x400f11c9  PS      : 0x00060130  A0      : 0x800d1dd8  A1      : 0x3ffb2740  
11:07:14.017 -> A2      : 0x3ffc006c  A3      : 0x3f402a10  A4      : 0x00000002  A5      : 0xffffffff  
11:07:14.017 -> A6      : 0x00000000  A7      : 0x00000000  A8      : 0x3ffc0060  A9      : 0x00000003  
11:07:14.049 -> A10     : 0x3ffc01b0  A11     : 0x00000020  A12     : 0x00001923  A13     : 0x000000ff  
11:07:14.049 -> A14     : 0x000000ff  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x0000001c  
11:07:14.049 -> EXCVADDR: 0x0000001b  LBEG    : 0x400d3960  LEND    : 0x400d396f  LCOUNT  : 0x00000000  
11:07:14.049 -> 
11:07:14.049 -> 
11:07:14.049 -> Backtrace:0x400f11c6:0x3ffb27400x400d1dd5:0x3ffb2760 0x400d1d39:0x3ffb2780 0x400d1298:0x3ffb27a0 0x400d44e7:0x3ffb2820 

I have also tried the sketch flash_manipulator.ino included with the Adafruit SPI_flash library, and it returns invalid/missing data such as JEDEC ID = 0xFFFFFF:

10:39:56.280 -> SPIFlash: No FAT partition foundAdafruit Serial Flash Manipulator example
10:39:56.280 -> JEDEC ID: FFFFFF
10:39:56.280 -> Flash size: 0
10:39:56.280 -> Initializing SD card... Card failed, or not present

Any ideas where to look? I have moved the 15001 module to each of the different slots and this changes nothing.

Hi @phil ,

It seems there were updates related to the SPI_Flash library. As I looked at it, most are related to RP2040 but there could be some side effects that affects ESP32. The latest 4.2.0 causes errors to me. I was able to validate version 3.4.1 to be working. Then 3.7.1 is the one used in our quick start guide. Maybe you can try this version and see if it will work ok in your setup.

Btw, if you are using IO5 for the temperature sensor. I will advise to not use Slot D and F since these sensor slots is used by RAK15001. This will likely affect the DS18B20 signal line.

Thank you for the quick reply @carlrowan. I’m using slot A for now. I wondered about the library version issue since I ran into that with the RAK11310 a few months ago. I will downgrade to v3.7.1 and test.

No luck yet. Versions 3.4.1 and 3.7.1 produce the following at compile time:

Compilation error: cannot declare variable 'g_flash' to be of abstract type 'Adafruit_SPIFlash'

Hi @phil,

Are you using this example for test? It is strange because I do not see any compilation error on my end.

As for the RAK11200 board version, I am using 2.0.3 which is the latest.


Yes to both questions: it’s the same example sketch and v2.0.3 ESP32 installed.

I have no idea yet what could be causing the issue but likely a board or library installed is having conflict on the SPI library.

The example sketch (RAK15001_Flash_GD25Q16C.ino) includes three libraries:

#include <Arduino.h>
#include "SdFat.h"
#include "Adafruit_SPIFlash.h" 

If it’s a module conflict I would have expected moving to a different slot to solve the problem.

OK, I got it working by also downgrading SdFat to 1.2.3

The operational combination is Adafruit_SPIFlash 3.4.1 and SdFat 1.2.3

This was also what I had to use to get it recognised by the RAK11310.

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