06 Charger problem?

they don't always set a code it took about two weeks after it starting stalling randomly for it to actualy set a code for the egr valve since the egr was replaced has been fine