Main Site Documentation

G120 4.3.2 vs 4.3.3 power tests


cobra has one power barrel jack, just connected a 12V PSU with a amperimeter in series to measure current.


The Cobra has a linear regulator on board(assumption). You are cconsuming0.0.024A x 12v =0.288watts. I am consuming 0.018A x 3.3v = 0.059watts. To get the power down you need to have an external switch mode regulator.


Did you mean 0.0044 x 3.3V? You said that you got 4,4mA @ sleep.Off


I was talking about sleepDeep not power off, but same applies for off


I cant seem to find anyone having success with this…? Any code to show?


Hi Dat_Tran, Is there a good example of setup for both RTC and Interrupt wake up on G120? I have tested the wakeup separately? I have this code below, but need a scenario to wake up board either from RTC alarm or Interrupt?

var key4 = new InterruptPort(PalPins.KeyPad2_P2_13, true, Port.ResistorMode.PullUp, Port.InterruptMode.InterruptEdgeHigh);
key4.OnInterrupt += interrupt_OnInterrupt;

PowerState.WakeupEvents |= HardwareEvent.OEMReserved1;
PowerState.Sleep(SleepLevel.DeepSleep, HardwareEvent.OEMReserved1);

//for RTC Alarm wake up, use OEMReserved2
PowerState.WakeupEvents |= HardwareEvent.OEMReserved2;
PowerState.Sleep(SleepLevel.Off, HardwareEvent.OEMReserved2);

How can we combine these two to be enabled at the same time? Thanks.


you asked the question elsewhere - no need to dig up old threads :wink:


PowerState.WakeupEvents |= HardwareEvent.OEMReserved1 | HardwareEvent.OEMReserved2;


Using the sleep modes is something we have on our list of things to look at it in the future. Do you know (or would you be willing to measure) how long it takes to wake up from each of the sleep modes? Thanks - Gene


Gpio interrupt: wake up if detected any interrupt from gpio. A note here is G120 has only Port0 and Port2 support gpio interrupt.
Alarm: wake up once matched setting alarm.

Not sure what “how long” you mean.


The system simply reclock the peripherals. It would only take milliseconds.


Fair question, I should have been more clear. Obviously there are a variety of strategies to reduce power in a system. We’ve designed a system that is as non-blocking and event driven as we can make it and we check for events every second or 2. So we have some time where we’re not doing anything but waiting for events. If we know we can wait up to 1000 milliseconds for an event and it only takes a few milliseconds to wake up, we can drop into a lower power state for 900 milliseconds (or more) and reduce our power consumption significantly. If it takes several 100s of milliseconds to wake up, it may not make as much sense.