I finished working on my brother-in-law's 2006 about 3 weeks ago, it was having this problem. i cured it by undoing all the grounds on the block, batteries, fuse-box and fenders. i used a dremel tool to clean ever surface and then reconnected them. then i cleaned all the connectors on the backside of the fuse box and ECM. oh, and i did a serious inspection of all the terminals and battery cables for bad connections and corrosion under any of the insulation. ive heard that the cable that connects the two batteries has given people problems before. the insulation was good but the terminals were suspect. after proper terminal connections i started it up and tested the truck. 3 weeks later and he said his fuel mileage is up a few MPG and the 2509 code hasn't shown up again. good luck.