-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
Hi All,
playing with one device, that have 2 power sources -> grid and battery. Pin PA0 indicate the source. PA0=1 means grid, PA0=0 means battery.
This one device is requested to sleep on battery mode with minimal consumption.
I expect following code will do all I need:
void PinUp() {} // empty function....
// .... in main, detected PA0 is low....
attachInterrupt(PA0, GPIO_Mode_IN_FLOATING, &PinUp, EXTI_Mode_Interrupt, EXTI_Trigger_Rising);
PWR_EnterSTOPMode(PWR_Regulator_ON, PWR_STOPEntry_WFI);
detachInterrupt(PA0);unfortunately it freeze and newer wake up :(
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels