42 SNVS_HPCR &= ~SNVS_HPCR_PI_EN;
43 while ((SNVS_HPCR & SNVS_HPCR_PI_EN)) {}
46 SNVS_HPCR = SNVS_HPCR_PI_FREQ(0b1111);
49 SNVS_HPCR |= SNVS_HPCR_PI_EN;
50 while (!(SNVS_HPCR & SNVS_HPCR_PI_EN)) {}
52 attachInterruptVector(IRQ_SNVS_IRQ, SNVS_isr);
53 NVIC_SET_PRIORITY(IRQ_SNVS_IRQ, 255);
54 NVIC_ENABLE_IRQ(IRQ_SNVS_IRQ);