I have test RTC example on both different hardware revision nRF51822 chip. 1)N51822 QFAAC0 1309AF 2)N51822 QFAAC0 1308AE
1309AF revision chip is function properly with the RTC example. However, 1308AE revision chip unable to function properly. Both chip had programmed with S110 SDK v5.2 hex file.
From debug mode, i have found that 1308AE LF clock unable to start. The program stuck in the while loop of lfclk_config(void) function. 1309AF LF clock able to start and trigger EVENTS_LFCLKSTARTED and go to next steps. All register's address are same for both chip.
static void lfclk_config(void) { NRF_CLOCK->LFCLKSRC = (CLOCK_LFCLKSRC_SRC_Xtal << CLOCK_LFCLKSRC_SRC_Pos); NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; NRF_CLOCK->TASKS_LFCLKSTART = 1; [b] while (NRF_CLOCK->EVENTS_LFCLKSTARTED == 0) { }[/b] NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; }
However, 1308AE chip able to function properly if remove the while loop in lfclk_config() function. What is the cause of this problem?