Penis probs.. Tmi?¿

Okay so I've been intimate sexually with my boyfriend for about a year now And we've never had any issues satisfying eachother. But all of a sudden in the heat of the moment, he just kinda went limp.. We got really frustrated cause it wouldn't get hard again & it's not like he wasn't attracted to me, he had no idea why it was happening.. So we took a little break from sex. Then about a week later, we went to do it again and everything was going perfect till he thought about it happening and it went limp again... Anyone know what may be the cause of this??