Skip to content

How can I reset Serial2 / UART2? #662

Closed
@jestebanes

Description

@jestebanes

Hardware:

Board: Own design based on ESP-WROOM-32
Core Installation/update date: 23/sept/2017
IDE name: Arduino IDE
SDK version: v3.0-dev-745-gc4e65d6a
Flash Frequency: 80Mhz
Upload Speed: 512000

Description:

I am using OTA to upgrade my firmware but after a software update Serial2 doesn't work properly
Apparently, if I make a hardware reset, the serial port works fine but if ESP.restart() is used the serial port doesn't work.

Doing a little investigation, ESP.restart call to esp_restart(); defined in system.h and I found, the library header. Then the problem is clear UART1 and UART2 weren't reset.

how can I reset those UARTs?

/**

  • @brief Restart PRO and APP CPUs.
  • This function can be called both from PRO and APP CPUs.
  • After successful restart, CPU reset reason will be SW_CPU_RESET.
  • Peripherals (except for WiFi, BT, UART0, SPI1, and legacy timers) are not reset.
  • This function does not return.
    */
    void esp_restart(void) attribute ((noreturn));

Best wishes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions