Closed
Description
It is very hard to describe what the actual issue is... And I could not locate where the Issue lies.
Basically, if you run the following code 2 times in a row in Thonny
#Code
from micropython import mem_info
mem_info()
b = bytearray(150 * 1024)
mem_info()
#Output
stack: 688 out of 15360
GC: total: 64000, used: 2416, free: 61584, max new split: 8257536
No. of 1-blocks: 35, 2-blocks: 7, max blk sz: 18, max free sz: 3836
stack: 688 out of 15360
GC: total: 217856, used: 155344, free: 62512, max new split: 8126464
No. of 1-blocks: 23, 2-blocks: 5, max blk sz: 9600, max free sz: 3839
you will notice, that the first time it goes very fast and the second time it takes a really long time for it to complete. This behavior can be observed on a lot boards using N16R8 module. Like: LOLIN S3, LOLIN S3 Pro, WeAct Studio esp32s3 N16R8, Official ESP32-S3-DevKitM-1.
The same piece of code causes some boards (Lilygo T-Display S3 AMOLED) to hard reset automatically.
For the testing, I always used the native USB.
To build the firmware I used:
make BOARD=ESP32_GENERIC_S3 BOARD_VARIANT=SPIRAM_OCT USER_C_MODULES=#A display driver written in C
Note: I tried simplely delete the line in this file, I also tried to set it to 0
.
#define MICROPY_HW_ENABLE_UART_REPL (1)
Neither approach had any effects on this Issue.