Closed bytebang closed 5 years ago
@bytebang,
Mmmmmm ......
This board use ESP32 PICO D4, and in this SOC GPIO16 is connected to the external SPI Flash. Usually it is not a good idea to use SPI Flash lines for other purposes.
See ESP32 PICO D4 datasheet:
https://www.espressif.com/sites/default/files/documentation/esp32-pico-d4_datasheet_en.pdf#page=18
Maybe using esp-idf and not Lua RTOS works, due to that portions of the program code are cached into RAM when you manipulate GPIO16, and maybe with Lua RTOS portions of code are not cached yet and because you manipulate SPI flash lines the code fails.
In any case if this board is using GPIO16 to reset the display it's a very, very bad idea.
Thanks for the reply.
It seems that a reset (with line 16) is not necessary. Unfortunately i have tried to get the display running on a board where the display is defect. On another unit the display works without the reset on the line 16.
Therefore i close this issue.
I try to compile LuaRTOS for the TTGO-LORA32-v2. It compiles fine and I can confirm that the SD Reader and WIFI are working.
However - this module has also an 128x64 OLED display, which has to be be resetted (by pulling down PIN 16 to GND and setting it to HIGH again). Therefore one can use the following LUA commands:
This procedure works on all other boards very well, but with this TTGOv2 board I am running into an issue where the GPIO16 can not be set as output pin - and therefore the OLED display can not be used.
The following snippet is made with
make monitor
, and it shows the issue:The mysterious thing is, that the command
pio.pin.setdir(pio.OUTPUT, X)
works for all GPIOs, but with GPIO 16 it crashes.The display itself is OK, because as i received the board it had an other firmware flashed which displayed things correctly.
I have been trying now for more than 9 hours to fix this issue (e.g. by compiling an older version of LuaRTOS (Dec-2018), by manipulating the stack size, by enabling and disabling various settings, and so on) but now I am definitely running out of ideas. Has anybody experienced such a behavior , or can anybody point me into the right direction ?