This is a very strange phenomenon: when I kill the “serial monitor”, the program in esp32-s3 will stop running.
Upload the program to ESP32-S3 and the program runs normally, but when killing the “serial monitor” of Platformio, namely, clicking the “Kill” button:
then the program stops.
Finially, I find the problem comes from monitor_rts and monitor_dtr of Platformio, the default value of monitor_rts and monitor_dtr is 11. When I add
monitor_rts = 0
monitor_dtr = 1
The problem solved. Other values, 00, 10 also worked. Don’t try 11, 11 is the default value, it doesn’t work.
Hope this can help someone if enconter the same problem.