Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Deepsleep go_to_sleep function does not work with UART(1) #91

Closed
@affoltep

Description

@affoltep

Please include the following information when submitting a bug report:

  • The Pycom board you are using (e.g. WiPy 2.0, LoPy).
    Lopy

  • The firmware version you are using. You can get it by executing the following Python code at the REPL:

(sysname='LoPy', nodename='LoPy', release='1.9.2.b2', version='v1.8.6-796-g489fafa0 on 2017-10-15', machine='LoPy with ESP32', lorawan='1.0.0' )

The following code prevents the LoPy for changing in deepsleep, issued by the initialization of the UART on port 1:

from machine import UART
from deepsleep import DeepSleep

ds = DeepSleep()


uart = UART(1, 9600)                         # init with given baudrate
uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters
#uart.deinit()
#
ds.go_to_sleep(60)  # go to sleep for 60 seconds

If you uncomment the the uart.deinit() the LoPy crash.

Regards
Peter

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