Open T1j3ff opened 1 year ago
To set flag in omReceive and process in main loop. Or to create task to process incoming Rx.
Should not do much in an ISR.
I am new to programming and I encounted this one right now. I didnt quite get the " dirty flags in the in onReceive() and onTxDone() functions"
can you send me the code for it? thank you!
LoRaSimpleGateway.ino Is unstable out of the box
I've Just changed this in LoRaSimpleGateway.ino
And I'm using a
ESP32wroom
and aSX1278 Ra-02 LoRa 433Mhz
And Bam
Why ?
Both
Are setting onReceive() and onTxDone() function to be called on a hardware interrupt on Pin2
, This is fine
But Both onReceive() and onTxDone() functions do Serial.print()
You never whant to do this, Functions called from interrupt should do there stuff as quick as possible and end ASAP. In this case , the Serial.print() are to long to execute , and the ESP32 panic, The watchdog expire
wdt timeout
and the ESP32 rebootRemoving Serial.print() in onReceive() and onTxDone() functions resolve the issue
I don't know how to cleanly resolve the issue But dirty flags in the in onReceive() and onTxDone() functions , and do the Serial.print() in the Main loop worked for me.