Losing object reference after lightsleep ESP32 #11877
Replies: 1 comment 2 replies
-
I can not reproduce this problem so I must be doing something else wrong. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Just sitting in a while loop waiting for an interrupt from the
RFM96W, but also waking-up from lightsleep every 55 seconds.
I find that I have to call
lora = SX127x(spi, pins = cnfg, parameters = loracnfg)
each time around the while loop.
If I put
lora = SX127x(spi, pins = cnfg, parameters = loracnfg)
outside of this while loop it runs once a second printing
b'no msg'
, ie no more lightsleepI have checked that reset_pin does stay high during the entire while loop.
When lora is defined outside of this loop I print out its object location. Then print out it's location before and after the lightsleep it is apparent that it's location changes after it comes out of lightsleep when triggered by wake_on_ext1. The wake_on_ext1 occurs when a RFM96W rxDone interrupt happens.
From the docs:
Why does the object location for lora change?
Beta Was this translation helpful? Give feedback.
All reactions