I believe it has something to do with your battery or battery connection to your PCM . Are you having any issues with the truck ? Or has the battery been disconnected at one point ? That could throw a code 12 as well .
Also check where your power go's into your fuse box . It'll probably be a good idea to check all your grounds as well . Just a thought , hope this helps .