How and where are the device setup values retained in the device?

Device configuration values are stored in non-volatile memory (i.e. onboard flash).