EE designed the board with both pins in use and both needing to wake up from STOP2. At start PA5 must be used to awake. Once awake, switch interrupt to PB5 for normal processing. When normal processing is done, switch back to PA5 and enter STOP2. ...