Energy aware scheduling and reliability are both very critical for real-time cyber-physical system design. However, it has been shown that the transient faults of a system will increase when the processor runs at reduced speed to save energy consumption. In this paper, we study total energy and reliability scheduling co-design problem for real-time cyber-physical systems. Total energy refers the sum of static and dynamic energy. Our goal is to minimize total energy while guaranteeing reliability constraints. We approach the problem from two directions based on the two different ways of guaranteeing the reliability of the tasks. The first approach aims at guaranteeing reliability at least as high as that of without speed scaling by reserving recovery job for each scaled down task. Heuristics have been used to guide the speed scaling and shutdown techniques that are used to lower total energy consumption while guaranteeing the reliability. The second way to guarantee the reliability of the tasks is to satisfy a known minimum reliability constraint for the tasks. The minimum reliable speed guarantees the reliability level of tasks, and is used as a constraint in the energy minimization problem. Both static and dynamic co-design methods are explored. Experimental results show that our methods are effective.