Why does my odometer reset to "0" miles when battery is removed. on 2005 GMC Sierra 2500 HD

After it resets it will climb to 16 miles and stop. It will not record anymore mileage. All guages and lights function fine in my cluster.

Asked by for the 2005 GMC Sierra 2500 HD
Is the speedometer working?
Yes every gauge works. The effected areas are the trip odometer, the regular odometer which should never reset and the engine hour meter also goes to zero and will not record any hours. The problem began when I had a loose battery connection that still allowed the engine to crank. The odometer would reset everytime I started the truck. I corrected the loose connection but now the regular odometer climbs to 16 miles and stops. It resets to zero if I disconnect the battery.
Follow #1 , I personally would recommend a dealer for this issue.
1 more answer
have shop check