A printer (1) comprises a motor driver (34) for driving a carriage motor (20) and a paper feed motor (22). The motor driver (34) has a thermal shutdown circuit (43). If internal temperature T of the motor driver exceeds threshold value Ta, the thermal shutdown circuit shuts down the power of the motor driver. The motor driver has an internal temperature detection circuit (45). If the internal temperature T exceeds threshold value Tb (<Ta) before thermal shutdown processing operates, the internal temperature detection circuit outputs a HW signal. A CPU (29) executes heat generation stop processing based on the HW signal and controls the motor driver to stop the carriage motor and the paper feed motor for a predetermined time.