Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-07-06 Thread Chris Laplante
Hi Peter, > > > > Working on adding this now. One question - if the CPU is off (via > > arm_set_cpu_off), will the 'DETECT' IRQ I add to nrf51_gpio.c still fire? > > > Yes. The only thing that turning the CPU off affects is > the CPU -- all the rest of the devices in the system > continue to b

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-07-03 Thread Peter Maydell
On Sat, 1 Jul 2023 at 20:29, Chris Laplante wrote: > > Hi Peter, > > > The reference manual is very unclear about what this "emulated > > system off" mode actually does. I think that implementing > > real "system off" is probably simpler. For that you should be able > > to implement it something l

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-07-01 Thread Chris Laplante
Hi Peter, > The reference manual is very unclear about what this "emulated > system off" mode actually does. I think that implementing > real "system off" is probably simpler. For that you should be able > to implement it something like this: > > (1) the power management device implements the SYS

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-07-01 Thread Chris Laplante
Hi Phil, > What problem are you getting with a single CPU? > The "arm/arm-powerctl.h" API should work well. > If you scheduled a timer, I expect it to awake > your CPU on expiration. You can also use a QMP > command to toggle a GPIO and trigger an IRQ. > > You can use the qtest API to test your c

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-06-19 Thread Peter Maydell
On Wed, 14 Jun 2023 at 14:02, Chris Laplante wrote: > > Hi all, > > I am working on improving nRF51 emulation. Specifically I want to implement > the special "System OFF" mode. System OFF is a power saving mode. In this > mode, the system can only be woken up by a reset or a handful of periphera

Re: Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-06-19 Thread Philippe Mathieu-Daudé
Hi Chris, On 14/6/23 04:27, Chris Laplante wrote: Hi all, I am working on improving nRF51 emulation. Specifically I want to implement the special "System OFF" mode. System OFF is a power saving mode. In this mode, the system can only be woken up by a reset or a handful of peripherals (most no

Emulation of 'System OFF' mode in ARM nRF51 SoCs

2023-06-14 Thread Chris Laplante
Hi all, I am working on improving nRF51 emulation. Specifically I want to implement the special "System OFF" mode. System OFF is a power saving mode. In this mode, the system can only be woken up by a reset or a handful of peripherals (most notably, GPIO via high/low level detection on configur