2006 Can am outlander 800r wont start for a few minutes after shutting it off.

My 2006 can am outlander I just got it, when I shut it off it wont start for a few minutes after and it shows check engine light. when I try and do p codes it just says active p code check engine light. it also says maintenance soon when I first start it. fresh oil. if I wait a few minutes it work fine other than maintenance soon