Can't use UART1 on esp32

kristof01124
Posts: 1
Joined: Fri Nov 25, 2022 12:45 pm

Can't use UART1 on esp32

Postby kristof01124 » Fri Nov 25, 2022 12:54 pm

Hi guys!

I am using the NodeMCU-32S board, and tried using Serial1 for communication between two esp-s. If i just call Serial1.begin(115200) the program chrashes on boot, and gives me this error message:
rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13864
load:0x40080400,len:3608
entry 0x400805f0
Everything works fine tho, if i use Serial2, using the corresponding ports, but i would need two HardwareSerials for my project.
I tested on multiple boards, and got exactly the same result.
I also tried using this:
  1. HardwareSerial SerialPort(1); // use UART1
  2.  
  3. void setup() {
  4.   SerialPort.begin(115200);
  5. }
But i still get the error. If i change the 1 to a 2, everything works fine.

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 137 guests