-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper Off menu item and 'Turn On' gesture #9
Comments
I haven't had time to look at or play with your new code yet, but I think I remember you mentioning turning off peripherals. Were you talking about those internal to the MCU, or the various external devices attached to the MCU? I didn't design the PSDR with an eye for excellent standby efficiency (not that I don't want to, it just wasn't high on the list and I had other things to worry about) but I did include the ability to kill power to many of the sub systems on the board (via MCU controlled FETs), and some of the chips can be turned off by setting them to lower power states via whatever bus they are connected to. I was pretty sure that the pins I used for the encoder switch, and maybe (hopefully!) the paddles supported pin change interrupts that should be able to wake the MCU, but I am not positive. Also potentially helpful would be slowing the clock way down, and setting up a routine that, for example, wakes the MCU on the first pin change event, then quietly watches for the other events in the gesture (whatever form that ends up taking) before bringing itself (and the other subsystems) up the rest of the way. If it doesn't see those other events within a certain time window, then it assumes that first event was unintentional and goes back to sleep. I think the boards draw around 8mA (is that right?) before they are programmed, so that might be as low as we end up getting, but that should give 10ish days, which I think would be reasonable at this stage of development. |
All I've done so far is do the opposite of the setupPeripheralPower() function, i.e: __GPIO_CLK_DISABLE() etc etc. then call HAL_PWR_EnterSTANDBYMode(). Not sure how much it helps, but It does recover when the reset button is pushed for at least a few hours after turning it off. I should have a bit of time this week to look a things in a bit more depth for power management, after I get myself together for my https://linux.conf.au/ miniconf presentation. I'll definitely be showing off the PSDR while I'm there :) |
I know it's not so high-tech, but perhaps an old-school switch between battery and radio would solve the problem? :-) |
Gonna see if I can revive this thread 😁 |
Hi,
I’m sure it’s the easiest route at least.
But i’d start by looking into the preamp issue (preamp not enabled, perhaps by not bing initialized in software) as this thing is deaf as a brick right now (sensitivity around -70dBm if I remember correctly, indicating 50 dB “missing”)
Regards
Jonas
… 4 feb. 2021 kl. 18:48 skrev Jeff Benson ***@***.***>:
To follow up on my above comment, couldn't you also just add a slide switch inline with the battery and have it poke out the "front" of the case, over by the rotary encoder? See below crude mockup:
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@sanamon I see what you're saying with regards to the preamp issue. Perhaps something that can be brought up in a separate issue for further discussion? |
While my current implementation of an off button 'works' it doesn't seem to preserve the battery much more than a day or so.
Also, I need to figure out how to get the unit into a state that can monitor the buttons for the turn on gesture, I don't think my EnterSTANDBYMode() can do that, it appears to only be able to look for rising edges on the PA0 pin or interrupts.
The text was updated successfully, but these errors were encountered: