Search found 10 matches

by John57
Wed Apr 07, 2021 1:56 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - Success

Description of my micropython additions/changes to get dormant wake working. I added an extra method into hardware_pin (maybe not the place to do it) that sets the dormant_wake registers from python. I previously had it incorporated into the general irq_enable method. Separation allows explicit fine...
by John57
Tue Apr 06, 2021 2:35 am
Forum: Raspberry Pi microcontroller boards
Topic: Dormant Interrupt Acknowledge
Replies: 0
Views: 1314

Dormant Interrupt Acknowledge

In the example code sleep.c described in the RP2024 Datasheet doc, an example is given where a dormant_wake interrupt is set then dormant mode is activated, and the when the wake interrupt occurs the code continues with a gpio_acknowledge_irq on the known gpio. All this code is in the same code bloc...
by John57
Thu Apr 01, 2021 1:35 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

Have implemented safe activation of dormant_wake, needed a routine to check if any dormant_wake_irq's were enabled by checking the chips dormant INTE registers.

John
by John57
Wed Mar 31, 2021 10:50 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

Success. 1) from pico-extras copy hardware_rosc to rp2_common and adjust cmake lists to match. This provides the method rosc_set_dormant to place pico into dormant mode. 2) enable dormant irq for the required gpio. This is done in the machine_pin_irq method, when a non zero wake argument is passed....
by John57
Tue Mar 30, 2021 12:23 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

Further thinking on this problem based on the current codebase. lightsleep invokes __wfe(). I have been reading all I can, does or can the rp2 initiate an event when an interrupt occurs? Or do we need to setup a specific sleep call that uses the __wfi() call. It also necessary to setup a wake on int...
by John57
Thu Mar 18, 2021 8:25 am
Forum: Raspberry Pi microcontroller boards
Topic: Using ssd1306 with larger fonts - a solution
Replies: 1
Views: 1875

Using ssd1306 with larger fonts - a solution

Hello, Info that may be useful. I have just interfaced a ssd1306 to the pico and is working well. However the distributed ssd1306 only supports a fixed small 8x8 pixel font. Which is small and indistinct on such a screen. I came across a project (https://github.com/mchobby/freetype-generator.git) th...
by John57
Wed Mar 17, 2021 1:00 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

I realize that but thought I maybe missing something.
by John57
Tue Mar 16, 2021 5:49 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

Thanks for that. What I seems to be missing is an option to activate a particular interrupt that will cause a wake from sleep, or that any interrupt will cause a wake from sleep. The lastest code version of the code does now include some linkages to the gpio_set_dormant_irq_enabled function, where n...
by John57
Sun Mar 14, 2021 1:41 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Re: Lightsleep with wake from interrupt - how?

Thanks for the Comments (sorry for the delay - been holidaying on a beach out of town). I have searched for sleep through the pico library and port code already, but cant remember whether i searched for wake. However I also saw the interrupts were seen after lightsleep calls but if you put a stateme...
by John57
Sat Mar 06, 2021 5:42 am
Forum: Raspberry Pi microcontroller boards
Topic: Lightsleep with wake from interrupt - how?
Replies: 14
Views: 9882

Lightsleep with wake from interrupt - how?

Hello, I can activate machine.lightsleep() and it appears to work. However I cannot find a way to enable a gpio interrupt to terminate the sleep. There is a function in the library (gpio.c) called gpio_set_dormant_irq_enabled but it doesnt appear to have an associated python method. Other micropytho...