fix RTC1 compare interrupt is not clear by bootloader

This commit is contained in:
hathach committed 2017-04-12 12:43:33 +07:00
1 parent b37b8bcb77
commit 117d251d4b
3 files changed
+10 -8

No files matched your search

+7
View File
@@ -76,6 +76,13 @@ void initVariant()
{
bootloaderVersion = BOOTLOADER_VERSION_REGISTER;
// RTC1 is already configured by bootloader. Disable it here
NVIC_DisableIRQ(RTC1_IRQn);
NRF_RTC1->EVTENCLR = RTC_EVTEN_COMPARE0_Msk;
NRF_RTC1->INTENCLR = RTC_INTENSET_COMPARE0_Msk;
NRF_RTC1->TASKS_STOP = 1;
NRF_RTC1->TASKS_CLEAR = 1;
// LED1 & LED2
pinMode(PIN_LED1, OUTPUT);
ledOff(PIN_LED1);