AU Mic is a young planetary system with a resolved debris disc showing signs of planet formation and two transiting warm Neptunes near mean-motion resonances. Here we analyse three transits of AU Mic b observed with the CHaracterising ExOPlanet Satellite (CHEOPS), supplemented with sector 1 and 27 Transiting Exoplanet Survey Satellite (TESS) photometry, and the All-Sky Automated Survey (ASAS) from the ground. The refined orbital period of AU Mic b is 8.462995 pm 0.000003 d, whereas the stellar rotational period is P_{rot}=4.8367 pm 0.0006 d. The two periods indicate a 7:4 spin--orbit commensurability at a precision of 0.1%. Therefore, all transits are observed in front of one of the four possible stellar central longitudes. This is strongly supported by the observation that the same complex star-spot pattern is seen in the second and third CHEOPS visits that were separated by four orbits (and seven stellar rotations). Using a bootstrap analysis we find that flares and star spots reduce the accuracy of transit parameters by up to 10% in the planet-to-star radius ratio and the accuracy on transit time by 3-4 minutes. Nevertheless, occulted stellar spot features independently confirm the presence of transit timing variations (TTVs) with an amplitude of at least 4 minutes. We find that the outer companion, AU Mic c may cause the observed TTVs.