Waking from pyb.stop() ?

Discussion related to "under the hood" OpenMV topics.
Blockhead
Posts: 3
Joined: Thu Nov 16, 2017 10:56 pm

Waking from pyb.stop() ?

Postby Blockhead » Thu Nov 16, 2017 11:12 pm

Hello,

I've been working on putting the openmv to sleep and waking it up. Using pyb.stop() makes it appear to be unresponsive to interrupts through RTC.wakeup() or an external interrupt (have only tried 'P0'). It goes to sleep and acts dead - no action on the serial port or leds from the interrupt routines. The exception is if I call pyb.hard_reset(), which does reset the openmv. I am using an M4 OV7725.

Is this the state of the art with openmv cam - that the unit must be hard_reset after pyb.stop? Same with the M7? Any workarounds? I'm building a device where the openmv unit will spend 99% of it's time sleeping, but needs to respond quickly (200ms?) to an external interrupt.

Thank you
User avatar
kwagyeman
Posts: 2275
Joined: Sun May 24, 2015 2:10 pm

Re: Waking from pyb.stop() ?

Postby kwagyeman » Thu Nov 16, 2017 11:53 pm

We haven't actually built out this feature on the firmware. Um, with firmware version 2.6 I believe this is working much better. Ibrahim will have to comment on this. I've pinged him.

...

As a side note, I'm sorry about the bugs on this. There's a lot of code to maintain and we run the company in our free time. We'd love to have folks with firmware knowledge help patch thing if possible.
Nyamekye,
User avatar
iabdalkader
Posts: 542
Joined: Sun May 24, 2015 3:53 pm

Re: Waking from pyb.stop() ?

Postby iabdalkader » Fri Nov 17, 2017 7:57 am

Hi, we're still working on low power modes (specifically I need the IDE to wait for longer to test sleep and wake up via RTC). The only implemented low-power function in the latest release is sensor.sleep(True) (there should be an example in the new IDE release, but you can call this function if you have the new firmware.)
Blockhead
Posts: 3
Joined: Thu Nov 16, 2017 10:56 pm

Re: Waking from pyb.stop() ?

Postby Blockhead » Mon Nov 20, 2017 10:21 pm

Thanks for the replies! I appreciate the work you've done putting this device and firmware together. I wish I had the knowledge to patch the firmware myself, but I'm going to have to wait for others on this one. Thanks again!
Blockhead
Posts: 3
Joined: Thu Nov 16, 2017 10:56 pm

Re: Waking from pyb.stop() ?

Postby Blockhead » Tue Nov 28, 2017 11:05 pm

So I've got an M7 cam now, with the 2.5 firmware, and I'm having the opposite problem - instead of the sleep being too deep, the sleep is very light and short! When I call pyb.stop() the board sleeps long enough to break the USB_VCP connection with the ide, but if I have a UART port sending out text once a second (using pyb.delay(1000)) there is no noticeable interruption in the UART output. I've got RTC.wakeup() running to wake the board, but it's waking up before RTC.wakeup() has a chance to to fire off. Any thoughts?
User avatar
kwagyeman
Posts: 2275
Joined: Sun May 24, 2015 2:10 pm

Re: Waking from pyb.stop() ?

Postby kwagyeman » Tue Nov 28, 2017 11:14 pm

Can you try v2.6 out? https://github.com/openmv/openmv/releases

It's right about to come out this weekend (finally I have time to get the release done).

Ibrahim may know more details about this issue.
Nyamekye,
User avatar
iabdalkader
Posts: 542
Joined: Sun May 24, 2015 3:53 pm

Re: Waking from pyb.stop() ?

Postby iabdalkader » Sun Dec 03, 2017 4:27 pm

Hi, there's no fix for deep sleep issues yet, I still need to test it with the new IDE. I'll report back as soon as I do that.
User avatar
iabdalkader
Posts: 542
Joined: Sun May 24, 2015 3:53 pm

Re: Waking from pyb.stop() ?

Postby iabdalkader » Fri Jan 05, 2018 5:33 pm

Hi, I'm happy to report that both stop mode and deepsleep mode are fixed and will be available in the next release (2.7). You can always test the development firmware if don't want to wait (you'll also find two new low-power example scripts in the repo).

Return to “Technical Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests