We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am trying to put my STM32F103 eval board into standby mode and wake it up using two different external interrupts. I can use the external interrupts with no problem, but I can not get the low power mode to work correctly. I set up the power modes with the following functions in my main():
/* Enable WKUP pin */ PWR_WakeUpPinCmd(ENABLE);
/* Allow access to BKP Domain */ PWR_BackupAccessCmd(ENABLE);
But it seems that as I step through the code on the hardware that it does not ever set the PWR_CR or PWR_CSR with the correct values (it works perfect in the simulator)...any ideas as to how to set those registers (i have also tried to directly set those PWR registers by byte masking and setting it equal to the values I want, no dice).
Are you sure that it should be possible to do this while you are debugging the chip?
What happens if you just download an application that puts it in power-save mode and run the program without any debugger?
I have done that and it just stays in low power mode and never wakes up...
I think my bigger concern is that I am setting trying to set the PWR registers and they are being set...those should absolutely be seen in the debugger, at least I would think they should since all of the other register changes show up (SPI, timers and UARt)
A number of processors have problems with debugging power-save operations since the debugging interfaces are more or less integrated into the processor.
I normally have a configuration option so that I can deactivate some power-save features when I'm about to debug.
The debugging interface you can find on a lot of processors is not there to be good, but to be decent at a minimal cost. They are more or less abusing the normal factory-test logic since boundary-scan electronics is already there.