M563 P0 D0 H1 F0 ; Define tool 0
M563 P0 D0 H1 F2 T45 ; Used for parts cooling fan
No, you need to use a single M563 command: M563 P0 D0 H1 F2 ; Define tool 0
M106 P3 S1 I0 F500 H1 T45 ; Set fan 3 (hotend) value, PWM signal inversion and frequency. Thermostatic control is turned on.
You don't have a Fan 3 unless you have a DueX2 or DueX5 connected.