I had a similar problem with my 17 2500 and it turned out to be a loose battery cable where the positive cable connects after leaving the battery. I kept loosing time on the clock and telling me to raise and lower the drivers window. Then sometimes it just was dead.