Skip to content

SoftwareSerial.end() does not stop the timer in half duplex mode. #2910

@ion-popa

Description

@ion-popa

Describe the bug
SoftwareSerial.end() does not stop the timer in half duplex mode. This is an issue when the controller is in sleep mode, as the timer interrupt is triggered continuously.

To Reproduce

void setup()
{
    SoftwareSerial softSer(PA3, PA3);
    softSer.begin(9600);
    softSer.println("Hello, SoftwareSerial!");
    softSer.end();
    HAL_PWR_EnterSLEEPMode(PWR_LOWPOWERREGULATOR_ON, PWR_SLEEPENTRY_WFI);
}

Expected behavior
SoftwareSerial.end() should stop the timer.

Desktop (please complete the following information):

  • OS: Windows
  • IDE: VS Code with PlatformIO and platform_packages redirecting to latest Arduino_Core_STM32 release
  • STM32 core version: 2.12.0
  • Upload method: SWD

Board (please complete the following information):

  • Name: Custom board based on STM32L443VC

Additional context
Test were made without starting the software serial, and the board stayed in sleep mode, as expected.

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