AC stress and electronic effects on SET switching of HfO2 RRAM