If the ePaper display does not work on your HeltecV2 then you will need to solve that problem first, before you think of sharing the SPI with LoRa\LMIC.
Have you checked if your ePaper library is ESP32 compatible ?
The Epaper displays do work on a shared SPI bus, but your question is not related to that, the question is really, why does my display not work an my ESP32 ?
This may not be the best place to solve a problems with your ESP32 hardware, the ESP32 itself (which is not an Arduino) is supported by Expressif or perhaps the Arduino\Displays forum.
Hi tuhorkko,
Did you find a solution to your problem? I’m having similar problems.
I have an Adafruit Lora M0 Feather and an Adafruit EPD display. The display works fine if I hard code the CS to disable the LoRa chipset, otherwise I just get random noise displayed on the EPD.
Does the Arduino LMIC library assume that there are no other devices on the SPI bus?
Please be more specific and specify the proper full name. HeltecV2 could mean several things.
Do you mean you got the ePaper display working on Arduino Uno without LoRa and without sharing SPI?
Do you mean you did not get the ePaper display working on your Heltec board even when you are not using LoRa (using an example from the ePaper library)? If not then that would be your next step to try.
It should be possible to use two different SPI interfaces on an ESP32: HSPI and VSPI. Only one of these is used for LoRa. Using a separate SPI interface for the display may help reduce/prevent timing issues related to LoRa SPI traffic.
I don’t use the scheduler that’s built in to any of the Arduino LMIC’s for data collection or sending a job. I set a flag (aka semaphore) when I request a send and then unset it when the transmission is complete.
So all I have to do is check the flag and if it’s not set, I could, in theory, because I haven’t got anything hanging off the back of SPI on any of my devices, use the CS line setup for the ePaper and do as I see fit.
It’s not well documented (yet), but if you read through the main loop on this and refer over to the functions (procedures, whatever) it uses, it should make things clearer.
Not sure what you are trying to say here.
.rxtx pin (definition) is unrelated to SPI and the radio can be busy both when receiving and when transmitting.
is there any example sketch that you can share?
I got the same issue with a ST7789 /ST7735 Display.
Display works alone with HW wired to Lora Chip and Display
LORA Works alone with HW wired to Lora Chip and Display
As soon as I use both Code parts in one sketch only the LORA Arduino LMIC part works