Arm® TrustZone Technology for the Armv8-M Architecture mentioned:
In a simplified view, the program address determines the security state of the processor, which can be either Secure or Non-secure.• If the processor is running program code in Non-secure memory, the processor is in Non-secure state.• If the processor is running program code in Secure memory, the processor is in Secure state.• If the processor is in Secure state, it must fetch instructions from Secure memory.
Is there a system register indicating the security state of the core?
AFAIK, in non-secure state you cannot check the state w/o excpetion.
Chapter B3.7 in DDI0553B_f leads to this: