• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

LoRa causes reboot when later access SD card

Q&A Forum › Category: ESP32 › LoRa causes reboot when later access SD card
0 Vote Up Vote Down
Joe Margevicius asked 3 years ago

Hi, I am implementing an SD card along with a LoRa modem card.  Independently, they work fine, and when combined, in setup(), the SD card is happy with writes, reads and appends after the LoRa is initialized. In the loop(), packets are received fine even after the SD card write/read/append accesses in setup().
 
But when I add in an append() (or a write()) after completing the available() section of the LoRa test code, the system crashes at File file = fs.open(path, FILE_APPEND); It has performed this fine in setup(), but for some reason, after a packet is received and displayed, it’s as if the SD goes missing.
 
Initially I had the SD card and the LoRa modem using the VSPI, with different ChipSelect pins. Then I move the SD to the HSPI (avoiding GPio12 because of bootup failures) to see if that made a difference – it didn’t.  Same exact performance (both work independently fine; combined, the SD card access works fine in setup(), but crashes when the exact same code is put after the packet is received and displayed). 
 
I’ve looked through the LoRa begin() and parsePacket() code, but can’t see any reason for this.
 
The error I get upon trying to open the file is:
 
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.
 
I searched the forum and web but no luck.  Any experience with this?  Thanks

Question Tags: LORA, SD card
1 Answers
0 Vote Up Vote Down
Joe Margevicius answered 3 years ago

I change receiver code to the LoRaReceiverCallback.ino (in the examples in the library), and get the same thing, though the error may be more informative:
 
Writing file: /data.txt
abort() was called at PC 0x40083c69 on core 1
 
That address is in the Gbytes … which is compatible with memory addresses of the SD card, but not the ESP32!
 
Is there any reason why it’s trying to open a file at that address after a packet is received, versus a valid address before the packet is received ?

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.