RAM Data Corruption when RX(GPIO3) Pin is not Connected to USB TTL
Posted: Fri Sep 10, 2021 6:20 am
Hardware: ESP32-WROOM-32E Module 4MB (ESP32-D0WD-V3 (revision 3))
Software: Arduino IDE with ESP32 Board V1.0.6
Configuration:
Selected Board: ESP32 Dev Module (esp32)
PSRAM: Disable
Partition Scheme: Minimal SPIFFS(1.9MB APP With OTA/190KB SPIFFS)
CPU Frequency: 240 MHz
Flash Mode: QIO
Flash Frequency: 80MHz
Flash Size: 4MB(32Mb)
Upload Speed:921600
Issue:
I have a 321 byte of file in SPIFFS, I read it in a 10KB char array type buffer. and Print it on Serial Port and TCP/IP Port, 4 times Without any operation on this Buffer.
Case 1: USB TTL Connected
All 4 times Buffer Printed Perfectly on both Serial Port and TCP/IP Port.
Case 2: USB TTL Not Connected
Data on TCP/IP:
1st time buffer Prints Perfectly.
2nd Time buffer print garbage data print.
3rd Time mostly garbage data print,
4th time most time garbage data print.
Issue is not generated in smaller size sample code. So can't share sample Code.
My Code build Analysis:
Sketch uses 1230490 bytes (62%) of program storage space. Maximum is 1966080 bytes.
Global variables use 90032 bytes (27%) of dynamic memory, leaving 237648 bytes for local variables. Maximum is 327680 bytes.
I tried to connect USB TTL pin one by one, first Connect TX Pin(ESP32) Only, Issue is generated. but when connect only TX Pin there is not issue. After that I have pulled up RX Pin with 4.7K. then my issue is solved permanently.
So, I want to know why this behavior occurs? What are causes this type of issue. and what's it Solution.
Software: Arduino IDE with ESP32 Board V1.0.6
Configuration:
Selected Board: ESP32 Dev Module (esp32)
PSRAM: Disable
Partition Scheme: Minimal SPIFFS(1.9MB APP With OTA/190KB SPIFFS)
CPU Frequency: 240 MHz
Flash Mode: QIO
Flash Frequency: 80MHz
Flash Size: 4MB(32Mb)
Upload Speed:921600
Issue:
I have a 321 byte of file in SPIFFS, I read it in a 10KB char array type buffer. and Print it on Serial Port and TCP/IP Port, 4 times Without any operation on this Buffer.
Case 1: USB TTL Connected
All 4 times Buffer Printed Perfectly on both Serial Port and TCP/IP Port.
Case 2: USB TTL Not Connected
Data on TCP/IP:
1st time buffer Prints Perfectly.
2nd Time buffer print garbage data print.
3rd Time mostly garbage data print,
4th time most time garbage data print.
Issue is not generated in smaller size sample code. So can't share sample Code.
My Code build Analysis:
Sketch uses 1230490 bytes (62%) of program storage space. Maximum is 1966080 bytes.
Global variables use 90032 bytes (27%) of dynamic memory, leaving 237648 bytes for local variables. Maximum is 327680 bytes.
I tried to connect USB TTL pin one by one, first Connect TX Pin(ESP32) Only, Issue is generated. but when connect only TX Pin there is not issue. After that I have pulled up RX Pin with 4.7K. then my issue is solved permanently.
So, I want to know why this behavior occurs? What are causes this type of issue. and what's it Solution.