Purpose of external tamper mask, enable interrupt, non-secure masked interrupt status and secure masked interrupt status bits.
Could you explain to me what is the purpose of the different bits associated to the tampers?
I am mainly focus on using the passive tampers of the STM32MP1 and I have seen the following configuration bits I don't fully understand:
What I understand:
- Register CR1 - TAMPxE = Enables/Disables the tamper
- Register CR2 - TAMPxTRG = In PASSIVE mode determines if the tamper is triggered in logic level 0 or 1.
- Register CR2 - TAMPxNOER = Does not erase the backup register/does not block reading of the BCKSRAM.
- Register SR - TAMPxF = Flag set when the tamper is triggered.
- Register CSR - CTAMPxF = Bit to clear the SR tamper flag.
What I am confused about:
- Register CR2 - TAMPxMSK = Does this bit stops the system to execute the interrupt and stops the backup register erasure? What is the difference between setting this to 1 and setting TAMPxIE to 0 + TAMPxNOER to 1?
- Register IER - TAMPxIE = I do understand this enables/disables the interrupt generated by the tamper triggered but I do not understand the relation with the TAMPxMSK bit.
- Register MISR - TAMPxMF = Are these just flags? Or must they be configured? What do they mean and how are they supposed to be used?
- Register SMISR - TAMPxMF = Are these the same as Register MISR but for secure context? If so
Another configuration bit I would like to clarify is "TAMPDPROT", changing this bit I could trigger the interrupt in the Secure Context in Sp-Min, but not in Non-Secure Context in Linux. This is probably because of some configuration missing in the Linux environment, How could I configure the linux to react to the interrupt? Printing a message for example...
Does the "TAMPDPROT" bit, limit the access and interaction, including the configuration registers and interrupt handler, to the secure context vs non-secure context?
Best regards,
Andrés
