A method for controlling a laundry drying machine (1; 201) equipped with a heat pump system during a drying cycle, said laundry drying machine (1; 201) comprising: - a control unit; - a treating chamber where laundry can be introduced to be dried with a drying air stream, said treating chamber apt to be rotated; - a heat pump system including a compressor, a first heat exchanger for cooling a refrigerant and heating the air stream, expansion means and a second heat exchanger for heating the refrigerant; - at least a passive switching device, not controllable by the control unit, adapted to cut the power supplied to the compressor when one or more predetermined operative parameters thresholds are exceeded; - at least an active switching device, controllable by the control unit, for selectively switching on and off the compressor; wherein said method comprises the steps of: - starting a drying cycle; - activating said heat pump system by switching on said compressor; - rotating said treating chamber; - evaluating if an inversion of direction of rotation of said treating chamber has to be performed and, characterized in that if an inversion of direction of rotation has to be performed, evaluating if an operating condition of said compressor which can cause the activation of said passive switching device exists; - if said operating condition does not exist, then performing the inversion of direction of rotation of said treating chamber, otherwise if said operating condition exists, then performing the following steps: a) switching off said compressor; b) performing the inversion of direction of rotation of said treating chamber; c) switching on said compressor. - a control unit; - a treating chamber where laundry can be introduced to be dried with a drying air stream, said treating chamber apt to be rotated; - a heat pump system including a compressor, a first heat exchanger for cooling a refrigerant and heating the air stream, expansion means and a second heat exchanger for heating the refrigerant; - at least a passive switching device, not controllable by the control unit, adapted to cut the power supplied to the compressor when one or more predetermined operative parameters thresholds are exceeded; - at least an active switching device, controllable by the control unit, for selectively switching on and off the compressor; - starting a drying cycle; - activating said heat pump system by switching on said compressor; - rotating said treating chamber; - evaluating if an inversion of direction of rotation of said treating chamber has to be performed and, characterized in that if an inversion of direction of rotation has to be performed, evaluating if an operating condition of said compressor which can cause the activation of said passive switching device exists; - if said operating condition does not exist, then performing the inversion of direction of rotation of said treating chamber, otherwise if said operating condition exists, then performing the following steps: a) switching off said compressor; b) performing the inversion of direction of rotation of said treating chamber; c) switching on said compressor. a) switching off said compressor; b) performing the inversion of direction of rotation of said treating chamber; c) switching on said compressor.