2019-08-21 04:53 AM
Before I enter the stop mode 2 I save all the GPIO MODER, OSPEEDR and PUDPR registers, configure pins as analogue (to save some power) and enter the STOP mode 2. When I exit the stop mode (I use RTC wakeup and GPIOs for that) I restore the above registers. Vvery second exit the GPIOA is disconnected from the physical pins. I can read and write the GPIOA registers (I was testing it using debug interface and the UART trace as well) but there is no effect when I write the ODR register. ODR sets correctly, but there is no action on the appropriate pins. It happens every second exit from the STOP mode. So the first exit all works fine, when I enter and exit the stop mode for the second time it does not, the third time all is fine and so on.
Other ports work fine
I have tried almost everything. Resetting, disabling and enabling the port. Adding the barriers delays and other magic, but unfortunately nothing works.
Do you have any clues?
Solved! Go to Solution.
2019-08-21 10:39 AM
I have found the workaround. If is switch the clock off before going to sleep and when exit enable the clock again all works fine.
2019-08-21 08:56 AM
Could you post a *minimal*, but complete compilable code exhibiting the problem? Do you have a L476 DISCO to try it there?
JW
2019-08-21 10:39 AM
I have found the workaround. If is switch the clock off before going to sleep and when exit enable the clock again all works fine.