Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem. The crack suggests that
Apple Retail Store - Genius Bar
Apple will exchange your iPod for a refurbished one for $99for 16 GB 5G and $149 for the other 5Gs They do not fix yours.
Apple - iPod Repair price