Compile problems in using millis() as a timer delay

Well, just to be fair, none of the existing C standards disallow capitalised, or _ prefixed variable names in “user” programs.

There is a common convention to use _ prefixed variables in libraries.
There is NO common convention for the capitalised variables.

And IMO, the fact that PM variable is defined in the CMSIS package and a user program has silently shadowed that variable, points to a problem of the build environment, not the user program.

So I would blame the XIAO’s Arduino support package, not the user.