# ESP32-CAM Hardware Serial Pins

**URL:** <https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389>\
**Category:** General Guidance\
**Created:** [June 19, 2023, 8:30am UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389 "2023-06-19T08:30:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BehicMV](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/behicmv/32/978277_2.png) [@BehicMV](https://forum.arduino.cc/u/BehicMV)\
**Post date:** [June 19, 2023, 8:30am UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/1 "2023-06-19T08:30:14Z")

</div>

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.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/c/3/2/c32e3a9d774fe40d43ad410303f3b0daa3945fbf.png)

As you see that GPIO 16 have "U2RXD" but there is no U2TXD 🤡. 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 😕 ) Inform me I can open new thread for the general error handling.

Thank you for your attention...

---

<div class="post-metadata">

**Author:** ![blh64](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/blh64/32/605986_2.png) [@blh64](https://forum.arduino.cc/u/blh64)\
**Post date:** [June 19, 2023, 11:55am UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/2 "2023-06-19T11:55:40Z")

</div>

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.

> <https://stackoverflow.com/questions/63399901/how-to-fix-guru-meditation-error-core-1-paniced-loadprohibited-error>

> **[Guru Meditation Error: Core 1 panic’ed - ESP32 Forum](https://www.esp32.com/viewtopic.php?t=10403)**
>
> Espressif ESP32 Official Forum

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [June 19, 2023, 12:27pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/3 "2023-06-19T12:27:27Z")

</div>

> [@BehicMV](#):
>
> Am I missing something or there is no feature for HardwareSerial in ESP32-CAM?

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

```arduino

#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);

```

---

<div class="post-metadata">

**Author:** ![BehicMV](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/behicmv/32/978277_2.png) [@BehicMV](https://forum.arduino.cc/u/BehicMV)\
**Post date:** [June 19, 2023, 12:40pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/4 "2023-06-19T12:40:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [June 19, 2023, 1:05pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/5 "2023-06-19T13:05:35Z")

</div>

> [@BehicMV](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Idahowalker](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/idahowalker/32/238858_2.png) [@Idahowalker](https://forum.arduino.cc/u/Idahowalker)\
**Post date:** [June 19, 2023, 1:21pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/6 "2023-06-19T13:21:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [June 19, 2023, 1:43pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/7 "2023-06-19T13:43:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![BehicMV](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/behicmv/32/978277_2.png) [@BehicMV](https://forum.arduino.cc/u/BehicMV)\
**Post date:** [June 19, 2023, 2:04pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/8 "2023-06-19T14:04:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [December 16, 2023, 2:05pm UTC](https://forum.arduino.cc/t/esp32-cam-hardware-serial-pins/1139389/9 "2023-12-16T14:05:29Z")

</div>

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