I am confused about "masking an interrupt" vs. "disabling an interrupt at peripheral level"
Q1. If I want to mask an interrupt, can't I just disable the interrupt at peripheral level?
Q2. How to mask an interrupt? For example LVD1 voltage detection (LVD1RIE = 1, LVD1RQSEL = 1). Is the masking by ICUB (Interrupt Controller), or CPU? What is the mechanism?
Q3. "Masking an interrupt" means you can temporarily put it on hold, and then come back to service it later?
Q1. "masking an interrupt" and "disabling an interrupt at peripheral level" is the same. Q2. There are 2 possibilities to mask an interrupt. If the interrupt has an interrupt enable bit (like LVD1RIE) set this bit to "0". Or you can set the interrupt priority to "0". LVD is not a typical peripheral interrupt. Typical peripheral interrupts have enable bit in IERxx register, the interrupt request in IRxxx register and a priority register IPRxxx. Q3. Interrupt request is always set, no matter if an interrupt is enabled or not. If an interrupt is not enabled the interrupt request can be read by software and appropriate action can be taken.