# ESP32-WROOM-D32 dev board uart/flash/etc question

**URL:** <https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145>\
**Category:** 3rd Party Boards\
**Created:** [June 2, 2024, 4:23pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145 "2024-06-02T16:23:26Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvb333007](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vvb333007/32/974521_2.png) [@vvb333007](https://forum.arduino.cc/u/vvb333007)\
**Post date:** [June 2, 2024, 4:23pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/1 "2024-06-02T16:23:27Z")

</div>

Hello everyone!

Got an ESP32 dev board as on a picture (ESP). It works but since I am new into Arduino (but have huge embedded dev background for freescale chips) I got a few questions.

1. ESP32 Technical Reference says there are 3 UARTs available, however I only can see two on the board. Which one is connected to CH340 chip? Can 2 UARTs be accessed/used at the same design with this board ? (I want to interface my ESP32 with LoRa and GSM boards at the same time)

2. Technical Reference says that it is around 500K flash available however this board has 4MB. Are these different flash chips? Is it connected to SPI and if yes - which one? Which address these chips are mapped? Should I change my boards.txt (and how?) to use with my board?

3. All pins, including DAC1/2 are marked as PWM pins. Does that mean I can't do analogWrite to DAC pin to get desired output voltage on this pin?

4. Is there any detailed information on booting process for the board? Boot loader source code?

Thanks!

 ![ESP32-DevBoard-Pinout](https://europe1.discourse-cdn.com/arduino/original/4X/7/7/e/77ead2a2a7d13b189ad9b6ba24c1d55b2c3e4645.jpeg)

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [June 2, 2024, 4:46pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/2 "2024-06-02T16:46:55Z")

</div>

Hi @vvb333007 ,

Welcome to the forum..

nice board..

1. Serial is tied to the CH340 for programming and serial prints debugging..  
Serial2 is in your diagram pins 16 and 17..  
Serial1 I forget..  
Serial1 and Serial2 can be re-assigned to almost any pin..  
So yes, you can use both at the same time..
2. depends on the board but yes allot of them come with additional SPI RAM..  
I believe it's incorporated into ram, so you can malloc it up, but check the docs, I use SPI ram with the cams but cams use it directly not me..
3. All PWM pins you can AnalogWrite too..
4. [Your core source..](https://github.com/espressif/arduino-esp32)

ESP32 runs RTOS..  
[Here's your guide..](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/freertos.html)

Search this board, it's a wealth of knowledge..

have fun.. ~q

---

<div class="post-metadata">

**Author:** ![sumguy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sumguy/32/1134826_2.png) [@sumguy](https://forum.arduino.cc/u/sumguy)\
**Post date:** [June 2, 2024, 6:18pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/3 "2024-06-02T18:18:05Z")

</div>

The flash is partitioned and if you require more program space you can select a different partition scheme from the Arduino IDE "Tools/Partition Scheme"

The tool "esptool.exe" is another way of looking into the ESP32 configuration and is very useful, you can use from the cmd prompt or there is also a gui app

> **[Esptools GUI - ESP32 Forum](https://www.esp32.com/viewtopic.php?t=13403)**
>
> Espressif ESP32 Official Forum

This doc is written for MicroPython but the hardware protocols and pinout is still good for your module

[https://docs.micropython.org/en/latest/esp32/quickref.html#uart-serial-bus](https://docs.micropython.org/en/latest/esp32/quickref.html#uart-serial-bus)

---

<div class="post-metadata">

**Author:** ![vvb333007](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vvb333007/32/974521_2.png) [@vvb333007](https://forum.arduino.cc/u/vvb333007)\
**Post date:** [June 2, 2024, 7:09pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/5 "2024-06-02T19:09:45Z")

</div>

Thanks for the answers!

It seems like i can call Serial1.setPins() to assign it to any pins I want

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [June 2, 2024, 7:17pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/6 "2024-06-02T19:17:59Z")

</div>

You're welcome..

Check this thread..  
[esp32-uart-hardware-serial-ports-help](https://forum.arduino.cc/t/esp32-uart-hardware-serial-ports-help/1011812)

~q

---

<div class="post-metadata">

**Author:** ![vvb333007](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vvb333007/32/974521_2.png) [@vvb333007](https://forum.arduino.cc/u/vvb333007)\
**Post date:** [June 7, 2024, 11:24am UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/7 "2024-06-07T11:24:12Z")

</div>

Yes it is obviously something strange with pins 16 and 17. I failed to initialize UART1 at these pins. However 18,19 works just fine. Thats strange. When tried pins 16 and 17 i defenitely got something back from the uart but length & content was corrupted :-/. Looks like common problem with this board. CPU is rev. 3.1. and latest Errata has nothing on these pins.

---

<div class="post-metadata">

**Author:** ![vvb333007](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vvb333007/32/974521_2.png) [@vvb333007](https://forum.arduino.cc/u/vvb333007)\
**Post date:** [June 7, 2024, 11:31am UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/8 "2024-06-07T11:31:26Z")

</div>

1. Answering my own questions:  
UART1 and UART2 are available but don't work on pins 16,17  
UART0 is on CH340.

2. 500K flash is actually ROM and is not available for writing, contains initial loader and look like functions implemented in this ROM can be used. There are .ld files with hardcoded entrypoints to the functions if I understood it right.

3. DAC pins can't do PWM the drawing is incorrect

---

<div class="post-metadata">

**Author:** ![sumguy](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sumguy/32/1134826_2.png) [@sumguy](https://forum.arduino.cc/u/sumguy)\
**Post date:** [June 7, 2024, 2:02pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/9 "2024-06-07T14:02:28Z")

</div>

@vvb333007 the hardware uart pins should be

uart0  
tx=GPIO1 rx=GPIO3 (also USB)

uart1  
tx=GPIO10 rx=GPIO9

uart2  
tx=GPIO17 rx=GPIO16

The 30 pin ESP32 Dev Kit you show in the picture does not bring out GPIO9 and GPIO10 to the header pins so it is unlikely you were able to test uart1. UART1 is available on the 36/38 pin dev boards

If you could not get hardware uart 2 working I am not sure why, I need to check it out on one of the 30 pin boards I have and post back at some time

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [June 7, 2024, 2:11pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/10 "2024-06-07T14:11:32Z")

</div>

> [@vvb333007](#):
>
> UART1 and UART2 are available but don't work on pins 16,17

UART1 exists within the ESP32 MCU; but, it is not useable as the physical pins (28, 29) of MCU that are supposed to be connected with UART1, they are now connecting with flash memory. See Fig-1 below:  
 ![ESP32Flash](https://europe1.discourse-cdn.com/arduino/original/4X/5/a/a/5aa775ba1bbcc2f3a2b118f45ca25400d5772bae.png)

 ![ESP32GPIO9-10_PPin28-29](https://europe1.discourse-cdn.com/arduino/original/4X/0/5/a/05aa2f4aa151ab1671c89e1538bda190703e7e30.png)  
Fig-1:

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [June 7, 2024, 2:15pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/11 "2024-06-07T14:15:39Z")

</div>

The attached file may worth reading:  
[ch-18 ESP32Lec.pdf](https://forum.arduino.cc/uploads/short-url/40dO8Owg2FKhdD5LoFyS6mJThJQ.pdf) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![vvb333007](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/vvb333007/32/974521_2.png) [@vvb333007](https://forum.arduino.cc/u/vvb333007)\
**Post date:** [June 7, 2024, 3:35pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/12 "2024-06-07T15:35:52Z")

</div>

Yeah, docs say that pins 6..11 must not be used as they are used internally for the flash.

I successfuly use UART1 now with SIM800L and it works just fine. UART1 at pins 18 and 19 (`HardwareSerial::begin(9600, **18, 19** );`). Also I didn't use Serial1 global variable but created a new instance of HardwareSerial;

---

<div class="post-metadata">

**Author:** ![GolamMostafa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/golammostafa/32/239011_2.png) [@GolamMostafa](https://forum.arduino.cc/u/GolamMostafa)\
**Post date:** [June 7, 2024, 4:29pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/13 "2024-06-07T16:29:04Z")

</div>

> [@vvb333007](#):
>
> I successfuly use UART1 now with SIM800L and it works just fine. UART1 at pins 18 and 19 (`HardwareSerial::begin(9600, **18, 19** );`).

I think you are using Serial0 (UART0/Serial) and NOT UART1.

> [@vvb333007](#):
>
> 500K flash is actually ROM and is not available for writing, contains initial loader and look like functions implemented in this ROM can be used. There are .ld files with hardcoded entrypoints to the functions if I understood it right.

This is the memory organizational digram (Fig-1) of ESP32. The NANO ESP32's one sould be similar.

 ![ESP32MemoryStruc](https://europe1.discourse-cdn.com/arduino/original/4X/8/6/4/86438cf2927fbccba008c507563cf514a157806a.png)  
Figure-1:

---

<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 4, 2024, 4:29pm UTC](https://forum.arduino.cc/t/esp32-wroom-d32-dev-board-uart-flash-etc-question/1267145/14 "2024-12-04T16:29:35Z")

</div>

Closed on December 4, 2024, 4:29pm UTC

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