My guess is that in order to be able to clear the status flag, you should first move to a non-secure mode or a soft-fail mode
I found some code, where they are checking that the state is soft-fail and caam is in state mode before clearing the violation. But not sure exactly where the state is really moved
The reg32_read_test, seems to be just reading and comparing against the expected value, but not really writing.
void snvs_sec_interrupt(void){
reg32_read_tst(SNVS_HPSR, 0x80000300,0xFFFFFFFF); // Moved to Soft-Fail
reg32_read_tst(CAAM_CSTA, 0x00000300,0x00000300); // CAAM in Fail Mode
reg32_read_tst(SNVS_LPSR, 0x40000000,0xFFFFFFFF);
reg32clrbit (SNVS_HPCOMR, 9); // clr fail security violation
// Probably move back to secure mode here
return;
}
Hope you find this info useful