declaring an "big buffer" on esp32-s3 (16MB Flash & 8Mb RAM) need "long" time to recover connection after crash #17282
-
Port, board and/or hardwareesp32-s3 "generic" (from AliExpress) YD-ESP32-23 / 2022-v1.3 MicroPython versionMicroPython v1.25.0 on 2025-04-15; Generic ESP32S3 module with Octal-SPIRAM with ESP32S3 Reproduction
called from main program: Expected behaviourwith 8MB available RAM, expect that, even is the buffer isn't used, the access to the esp32 card will be possible. When my program crash during tests, after the buffer allowance, it need minutes or more, to recover the USB link to the card, or before I include an:
at the end of the program. The fastest way is to do an hard RESET Observed behaviourthe esp32 need minutes (more than five) before communication with PC and (portable) Thonny v4.17 is (again) possible, without the use of the hard reset. First I didn't use the "Generic ESP32S3 module with Octal-SPIRAM with ESP32S3" firmware, so, the available RAM was little as ~300KB. Withe the Octal version I get;
Additional InformationNo, I've provided everything above. Code of ConductYes, I agree |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 7 replies
-
I think this is too early in troubleshooting to declare this a MicroPython bug. Best to change this tool a Discussion When using large buffers, the best thing is to allocate them first, before any other activities. You did not share what other things your main.py does, so it's not clear at what stage you allocate. It would be helpful if you can share a minimal reproduction, that has the issue. I usually do this by commenting out chunks of code to find the root cause. |
Beta Was this translation helpful? Give feedback.
-
Hello Josverl, thank you for your answer.
On the display class: (writes to the LCD controler)
The things are working, but if I let that "big" buffer on memory, to have access to the esp32 throught the USB/serial connection, even after an CTRL-C stop, I hope that those information will help |
Beta Was this translation helpful? Give feedback.
-
I have converted this to a discussion for the reason stated above. The code sample is incomplete: the symbol In any event, as @Josverl states, a large buffer should be declared early. Further, if you want to vary the size, it's best to use a As a general point to declare a MicroPython bug you should produce a minimal code sample that reproduces the behaviour. |
Beta Was this translation helpful? Give feedback.
-
@chf-6309 You are right that the ILI9488 doesn't support RGB565 over SPI (despite a contrary indication in the datasheet). The situation is confusing because it does support RGB565 over a parallel interface, and some ILI9488 boards have an SPI to parallel convertor. This can lead developers to think they have written an ILI9488 driver when in fact they have not. The driver I mentioned converts 4-bit color to RGB888 on the fly using a LUT to enable the framebuffer to be small. However it is intended for use with the GUIs and obviously can't display full color images. Re Thonny I use |
Beta Was this translation helpful? Give feedback.
I have converted this to a discussion for the reason stated above.
The code sample is incomplete: the symbol
ILI9488
is undefined. What driver are you using? It's possible that the driver declares its ownFrameBuffer
instance (as per this ILI9488 driver).In any event, as @Josverl states, a large buffer should be declared early. Further, if you want to vary the size, it's best to use a
memoryview
to perform allocation-free slicing of the buffer.As a general point to declare a MicroPython bug you should produce a minimal code sample that reproduces the behaviour.