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
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 ?