I have a question about LVD for MKW36A512:
When I enable the interruption and disable the reset function of LVD, the decrease of VDD voltage can trigger LVDF setting, but it will not trigger LVD_LVW_DCDC_IRQHandler Call.Why?
Thanks in advance.
PMC->LVDSC1 = PMC_LVDSC1_LVDV(1);
PMC->LVDSC1 |= PMC_LVDSC1_LVDACK(1);
PMC->LVDSC1 | PMC_LVDSC1_LVDRE(1);
PMC->LVDSC2 = PMC_LVDSC2_LVWV(1);
PMC->LVDSC2 |= PMC_LVDSC2_LVWACK(1);
PMC->LVDSC2 |= PMC_LVDSC2_LVWV(1);
Hi Luo Liang
I cannot see in the function you posted the setting of the LVD Interrupt Enable bit and the enabling of the corresponding interrupt request in the NVIC module. Could you please confirm if these settings are in another part of your program?
Also, please take into consideration that the LVD Reset Enable bit is a write-once bit. Once you made a write on PMC_LVDSC1 register you would not be able to change the configuration of this bit until the next reset.
Please let me know if you need any more information.
Thanks! I forgot to configure NVIC。