IDF PATCH TO SOLVE RMT CRASH WEHN SAVING TO FLASH
This commit is contained in:
parent
a9e0a1e60d
commit
d0a5da308d
66
patch/RMT/BUG FIX FOR RMT EXCESS TRANSITIONS.txt
Normal file
66
patch/RMT/BUG FIX FOR RMT EXCESS TRANSITIONS.txt
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
BUG FIX FOR RMT EXCESS TRANSITIONS
|
||||||
|
|
||||||
|
Problem
|
||||||
|
~~~~~~~
|
||||||
|
Using a UHF receiver throws noise into the RMT peripheral.
|
||||||
|
Standard IDF function esp-idf\components\driver\rmt.c reports
|
||||||
|
"RMT RX BUFFER FULL" (line 593) when attempting to pull a
|
||||||
|
noisy capture.
|
||||||
|
|
||||||
|
|
||||||
|
A core panic occurs when the system is writing to FLASH memory:
|
||||||
|
FOTA updates
|
||||||
|
SPIFFS updates
|
||||||
|
Preferences updates
|
||||||
|
|
||||||
|
If the RMT interrupt occurs during a flash write a core panic due to
|
||||||
|
accessing non cached memory, being the debug message string.
|
||||||
|
|
||||||
|
Commenting out the debug message line allows the code to function OK.
|
||||||
|
System does not crash, but we lose the warning.
|
||||||
|
(On the contrary, it is an annoying message anyway).
|
||||||
|
|
||||||
|
How to fix it
|
||||||
|
~~~~~~~~~~~~~
|
||||||
|
Get the ESP-IDF for the ESP32
|
||||||
|
Determine the IDF release used by arduino-esp32. This is best achieved
|
||||||
|
by examining the results from calling the run time esp_get_idf_version().
|
||||||
|
The first part of the SHA of the release is the value following the "g"
|
||||||
|
in the last field:
|
||||||
|
eg: v3.2.3-14-gd3e562907 => d3e562907
|
||||||
|
|
||||||
|
Locate and switch the IDF to that SHA.
|
||||||
|
|
||||||
|
Comment out the debug print @ line 593 of esp-idf\components\driver\rmt.c
|
||||||
|
|
||||||
|
Create a copy of the IDF Blink example:
|
||||||
|
eg:
|
||||||
|
esp-idf\examples\get-started\blink ->
|
||||||
|
esp-idf\examples\get-started\arduinobuild
|
||||||
|
|
||||||
|
IMPORTANT:
|
||||||
|
Copy the sdkconfig file from the arduino-esp32 build being used to the copy
|
||||||
|
created in the previous step:
|
||||||
|
eg for platformIO
|
||||||
|
C:\Users\$USER$\.platformio\packages\framework-arduinoespressif32\tools\sdk
|
||||||
|
-> esp-idf\examples\get-started\arduinobuild
|
||||||
|
|
||||||
|
Using an ESP-IDF command prompt, navigate to the project
|
||||||
|
eg: esp-idf\examples\get-started\arduinobuild
|
||||||
|
|
||||||
|
Execute idf.py fullclean
|
||||||
|
Execute idf.py build
|
||||||
|
|
||||||
|
Copy the libdriver.a file from the build result to the arduino-esp32 lib:
|
||||||
|
esp-idf\examples\get-started\arduinobuild\build\driver ->
|
||||||
|
C:\Users\$USER$\.platformio\packages\framework-arduinoespressif32\tools\sdk\lib
|
||||||
|
|
||||||
|
delete the libFrameworkArduino.a file from the PIO build outputs
|
||||||
|
eg .pio\build\esp32dev
|
||||||
|
|
||||||
|
Rebuild the PIO project, the Arduino libraries will be relinked, using the new
|
||||||
|
libdriver.a
|
||||||
|
|
||||||
|
Upload and test new build
|
||||||
|
|
||||||
|
PROBLEM SOLVED!
|
BIN
patch/RMT/libdriver.a
Normal file
BIN
patch/RMT/libdriver.a
Normal file
Binary file not shown.
12
patch/RMT/readme.txt
Normal file
12
patch/RMT/readme.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Copy libdriver.a to arduino-esp32 lib folder
|
||||||
|
|
||||||
|
eg for PIO,
|
||||||
|
C:\Users\$USER$\.platformio\packages\framework-arduinoespressif32\tools\sdk\lib
|
||||||
|
|
||||||
|
ensure the arduinopackage gets rebuilt.
|
||||||
|
eg for PIO
|
||||||
|
delete Afterburner\.pio\build\esp32dev\libFrameworkArduino.a
|
||||||
|
|
||||||
|
Next time you rebuild, the Arduino package will include the patched libdriver.a
|
||||||
|
which solves the problem caused by the error message being printed
|
||||||
|
|
|
@ -133,9 +133,9 @@
|
||||||
// #define RX_DATA_TIMOUT 50
|
// #define RX_DATA_TIMOUT 50
|
||||||
|
|
||||||
const int FirmwareRevision = 32;
|
const int FirmwareRevision = 32;
|
||||||
const int FirmwareSubRevision = 1;
|
const int FirmwareSubRevision = 2;
|
||||||
const int FirmwareMinorRevision = 0; // used for beta version - zero for releases
|
const int FirmwareMinorRevision = 0; // used for beta version - zero for releases
|
||||||
const char* FirmwareDate = "22 Jun 2020";
|
const char* FirmwareDate = "29 Jun 2020";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macro to check the outputs of TWDT functions and trigger an abort if an
|
* Macro to check the outputs of TWDT functions and trigger an abort if an
|
||||||
|
|
Loading…
Reference in a new issue