Search found 15 matches
- Sun Mar 24, 2019 9:56 pm
- Forum: ESP32 Arduino
- Topic: Serial Won't Start After Serial.end()
- Replies: 2
- Views: 4957
Re: Serial Won't Start After Serial.end()
Adding a flush and delay makes this program work as expected now. A byte is written on the TX pin every 100 ms. #include <HardwareSerial.h> uint8_t a= 10; HardwareSerial MySerial(1); void setup() { pinMode(10, OUTPUT); } void loop() { MySerial.begin(250000, SERIAL_8N1, 9, 10); MySerial.write(a); MyS...
- Sun Mar 24, 2019 12:32 am
- Forum: ESP32 Arduino
- Topic: Serial Won't Start After Serial.end()
- Replies: 2
- Views: 4957
Re: Serial Won't Start After Serial.end()
I tried changing the code to use HardwareSerial specifically but the results are the same. #include <HardwareSerial.h> uint8_t a= 10; HardwareSerial MySerial(1); void setup() { } void loop() { MySerial.begin(250000, SERIAL_8N1, 9, 10); MySerial.write(a); MySerial.end(); //MAKE PIN 10 GENERAL IO AND ...
- Sat Mar 23, 2019 11:00 pm
- Forum: ESP32 Arduino
- Topic: Serial Won't Start After Serial.end()
- Replies: 2
- Views: 4957
Serial Won't Start After Serial.end()
I wrote program to begin serial 1, send a byte then disable serial1 and loop. If Serial1.end() is called then the TX pin will not function properly. The first time loop() runs it send the byte then stays low for about 600 microseconds and stays high after that. The TX channel stops toggling after th...
- Wed Oct 17, 2018 9:36 am
- Forum: ESP32 Arduino
- Topic: ESP32 SD Library Won't Recognize SD Card After Reinserted
- Replies: 2
- Views: 5231
Re: ESP32 SD Library Won't Recognize SD Card After Reinserted
Here is all the code, basically the SD_Test example #include "FS.h" #include "SD.h" #include "SPI.h" void listDir(fs::FS &fs, const char * dirname, uint8_t levels){ Serial.printf("Listing directory: %s\n", dirname); File root = fs.open(dirname); if(!root){ Serial.println("Failed to open directory");...
- Tue Oct 16, 2018 10:48 am
- Forum: ESP32 Arduino
- Topic: ESP32 SD Library Won't Recognize SD Card After Reinserted
- Replies: 2
- Views: 5231
ESP32 SD Library Won't Recognize SD Card After Reinserted
Hi All Using the SD library (not SD MMC), if I have the SD card in and start the ESP32 then the card is recognized. If I take out the card and put it back in seconds later, it will not be recognized again. if(!SD.begin(cs, SPI, freq)) this will fail. Has any one seen this before? Does the SD card ne...
- Thu Sep 13, 2018 6:40 pm
- Forum: ESP32 Arduino
- Topic: SD Card Hangs With Shared SPI Pins
- Replies: 1
- Views: 4040
Re: SD Card Hangs With Shared SPI Pins
Scope shows there is no activity on SCK during the hang.
Is it maybe something in the "fs" library?
Is it maybe something in the "fs" library?
- Thu Sep 13, 2018 9:29 am
- Forum: ESP32 Arduino
- Topic: SD Card Hangs With Shared SPI Pins
- Replies: 1
- Views: 4040
SD Card Hangs With Shared SPI Pins
I want to connect a SD card on VSPI and also connect a LCD on the same pin for MISO, MOSI, SCK. The 2 CS pins are connected on different ESP pins so that I can control which device the SPI is talking to. The SD card example included with the ESP32 core hangs after LCD commands. cardSize = SD.cardSiz...
- Thu Sep 13, 2018 4:43 am
- Forum: ESP32 Arduino
- Topic: Error: region `dram0_0_seg' overflowed by 31632 bytes
- Replies: 9
- Views: 17211
Re: Error: region `dram0_0_seg' overflowed by 31632 bytes
What exactly happens when it reboots? If allocating 115200 bytes fails then the assert() will fail, and the ESP32 will print an error message and reset. This means there wasn't enough free heap (in a single contiguous block) to allocate 115200 bytes. Maybe there is enough to make 2-3 smaller alloca...
- Tue Sep 11, 2018 9:30 am
- Forum: ESP32 Arduino
- Topic: Understanding free heap memory
- Replies: 4
- Views: 26493
Re: Compiler does not report space taken by big char arrays??
I have the same problem with large arrays and heap limitations. heap_caps_get_largest_free_block(8) returns 113K bytes and ESP.getFreeHeap() returns 285K bytes. Because blocks are not contiguous, the maximum size you will be able to allocate from the heap will always be smaller than the value return...
- Tue Sep 11, 2018 5:52 am
- Forum: ESP32 Arduino
- Topic: Error: region `dram0_0_seg' overflowed by 31632 bytes
- Replies: 9
- Views: 17211
Re: Error: region `dram0_0_seg' overflowed by 31632 bytes
Now I tried 2 arrays with half the size each in case the compiler doesnt like one large memory allocation but it doesnt compile either uint8_t arrA[57600]; uint8_t arrB[57600]; float arrF[768]; uint8_t arr2[768]; uint8_t arr3[768]; uint16_t arr4[850]; void setup() { Serial.begin(250000); } void loop...