-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using with ESP32 #13
Comments
I addition, when a lot of packets come in, a WDT reset can still occur. |
I just read you comments. I is already 3 years ago that i created the plugin based on your initial work , so in meantime i didn't do any maintenance on this plugin. For 3/4 months ago i switched to ESPHome and created a project for this also on github. I am aware that there are some problems with the interrupt handling. Someone mentioned that the Ticker library causes problems on the ESP8286. I already saw a solution where they set a flag in the ISR and check that flag in the PLUGIN_TEN_PER_SECOND, if true then call the code that is now in the ISR. Call schema: The Ticker is also an other interrupt and should possible also be declared as : I remember reading somewere that ICACHE_RAM_ATTR attributes could cause problems on a ESP32. |
Currently working on a fix at the above mentioned letcontrlit forum.
When I am satisfied AND have some more spare time, I will probably put it on github. |
I found which changes are needed to get this working on the ESP32 version of ESPEASY, and thought you would like to know too.
First you need to enable SPI in the GUI as HSPI, so with pins 14/12/13.
Then I use a fix for SS:
In the CC1101.cpp, rename every SS to mySS and add the following on top of the file:
#define mySS 15
This makes the code use pin 15 as the SS(CS) pin according to the default HSPI layout.
Next, remove (or comment out) the following line:
SPI.begin();
Otherwise boot will hang due to beginning SPI twice.
Then a WDT reset will occur after a couple of received packets.
This can be solved by some changes in the _P145_Itho.ino file.
Add this to the beginning of the void PLUGIN_145_ITHOinterrupt():
detachInterrupt(Plugin_145_IRQ_pin);
To disable new interrupts while handling a previous packet.
Re-enable the interrupts again after finishing the processing of a packet by adding this to the end of the void PLUGIN_145_ITHOcheck():
attachInterrupt(Plugin_145_IRQ_pin, PLUGIN_145_ITHOinterrupt, RISING);
The text was updated successfully, but these errors were encountered: