DFLL Clock Source freezing program

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello, I'm attempting to run the ASF APPS_SIMPLE_EXAMPLE_STAR program on my ATSAMR21B18 however, the code always gets stuck waiting for the DFLL clock source to become ready. It gets stuck in the while loop in the following block of code.

 

#if CONF_CLOCK_DFLL_ENABLE == true
	system_clock_source_enable(SYSTEM_CLOCK_SOURCE_DFLL);
	while(!system_clock_source_is_ready(SYSTEM_CLOCK_SOURCE_DFLL));
	if (CONF_CLOCK_DFLL_ON_DEMAND) {
		SYSCTRL->DFLLCTRL.bit.ONDEMAND = 1;
	}
#endif

Changing FLASH_WAIT_STATES from 2 to 3 did not help. Any tips are greatly appreciated.