ESP32-CAM Hardware Serial Pins

Hi,
I have an ESP32-CAM board. I was using the U0R and U0T for Serial debugging and flashing. And also I was using the 14 and 15 pins for SoftwareSerial for communicate with another module.

However, I got "Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled." error while I were initiailizing the SoftwareSerial. GPT4 said that it might be caused by the pin selection and I tried with 12 13 pins but the results were same. Now I decided to use "HarwareSerial". But most of the users say that HardwareSerial pins are 16 and 17 but when I have a take look to the pin layout there is no GPIO 17.

As you see that GPIO 16 have "U2RXD" but there is no U2TXD :clown_face:. Am I missing something or there is no feature for HardwareSerial in ESP32-CAM?

Also the Core error might not be caused by the pin selection. If you are sure that the error caused by different problem (I think so but I am hopeless :confused: ) Inform me I can open new thread for the general error handling.

Thank you for your attention...

If you search using google vs. ChatGPT, you'd probably find better answers. It appears you are corrupting memory, either by over-writing strings or a stack overflow... Since you didn't post your code, only you know.

Your missing something, you can allocate the pins used for hardware serial like this;


#define RXD2 xx               //replace xx with serial RX pin 
#define TXD2 xx               //replace xx with serial TX pin

 Serial2.begin(115200, SERIAL_8N1, RXD2, TXD2);  //monitor port, format is Serial2.begin(baud-rate, protocol, RX pin, TX pin);

Thank you @srnet but I know this usage of the Hardware Serial. The issue is, which pins are useable for Hardware serial.

I think most, if not all are usable. Try different ones, using the approach in post #3 and let us know if any DON'T work. Everything I have tried does work.

GPT4 said that it might be caused by the pin selection

Nonsense.

1 Like

Use GPIO_16 and GPIO_0 or 4 or 2 or 14 or 15 or 13 or 12 depending upon what else will be connected to the thingy.

Software serial does not work with the ESP32's.

1 Like

There is an ESP32 version of the library available but why would you use it ?

Thank you for all your answers but I have handled the situation with using the U0R and U0T. And connect paralell with pc and the module. Otherwise I couldn't solve it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.