External rotor motor with K-flange