Issue running LoRa with dual cores
Posted: Mon Sep 23, 2019 4:19 pm
Hi,
Can any of you "experts" help out on this issue.
I'm running an ESP32 NodeMCU with LoRa module (RFM95W) and an ILI9488 display.
The libraries I'm using can be found here:
https://github.com/sandeepmistry/arduino-LoRa
https://github.com/Bodmer/TFT_eSPI
I'm using the recommended default GPIO's for the LoRa module as these seem to work best with the display and sharing the same SPI bus with the display.
GPIO's used for LoRa:
// LoRa setup using default GPIO's
#define SCK_GPIO5 5
#define MISO_GPIO19 19
#define MOSI_GPIO27 27
#define SS_GPIO18 18
#define RST_GPIO14 14
#define DI0_GPIO26 26
#define LoRa_BAND 868E6
GPIO's used for TFT:
#define TFT_SCLK 5
#define TFT_MISO 19 // ILI9488 - connect T_D0 but leave TFT MISO disconnected if other SPI devices share MISO
#define TFT_MOSI 27
#define TFT_CS 15
#define TFT_DC 2
#define TFT_RST 4
#define TOUCH_CS 0 // Chip select pin (T_CS) of touch screen
Everything works fine and as expected and LoRa packets are received OK if running on just one core of the ESP32 (tested in excess of 20 hours).
Compiling the same code to run on both cores with LoRa on core 0 and the TFT on core 1, I am experiencing problems.
The first LoRa packet is normally received OK but then all other packets are either corrupt, not received, or anything other than the packets sent (output to serial monitor).
Further, after the first packet is received LoRa.parsePacket() never returns any positive value and LoRa.read() never gets called.
I've run with TFT's ILI9341 and ILI9488 but always the same problem when running dual core.
Really need help in solving this issue. Might be something simple for you "experts" but I'm pulling my hair out trying to find a solution !!
Thanks in advance for any help and advice.
Regards.
Can any of you "experts" help out on this issue.
I'm running an ESP32 NodeMCU with LoRa module (RFM95W) and an ILI9488 display.
The libraries I'm using can be found here:
https://github.com/sandeepmistry/arduino-LoRa
https://github.com/Bodmer/TFT_eSPI
I'm using the recommended default GPIO's for the LoRa module as these seem to work best with the display and sharing the same SPI bus with the display.
GPIO's used for LoRa:
// LoRa setup using default GPIO's
#define SCK_GPIO5 5
#define MISO_GPIO19 19
#define MOSI_GPIO27 27
#define SS_GPIO18 18
#define RST_GPIO14 14
#define DI0_GPIO26 26
#define LoRa_BAND 868E6
GPIO's used for TFT:
#define TFT_SCLK 5
#define TFT_MISO 19 // ILI9488 - connect T_D0 but leave TFT MISO disconnected if other SPI devices share MISO
#define TFT_MOSI 27
#define TFT_CS 15
#define TFT_DC 2
#define TFT_RST 4
#define TOUCH_CS 0 // Chip select pin (T_CS) of touch screen
Everything works fine and as expected and LoRa packets are received OK if running on just one core of the ESP32 (tested in excess of 20 hours).
Compiling the same code to run on both cores with LoRa on core 0 and the TFT on core 1, I am experiencing problems.
The first LoRa packet is normally received OK but then all other packets are either corrupt, not received, or anything other than the packets sent (output to serial monitor).
Further, after the first packet is received LoRa.parsePacket() never returns any positive value and LoRa.read() never gets called.
I've run with TFT's ILI9341 and ILI9488 but always the same problem when running dual core.
Really need help in solving this issue. Might be something simple for you "experts" but I'm pulling my hair out trying to find a solution !!
Thanks in advance for any help and advice.
Regards.