Code: Select all
SysTick_Config(SystemCoreClock / 1000);
Code: Select all
/**
* Initial system clock frequency. The System RC Oscillator (RCSYS) provides
* the source for the main clock at chip startup.
*/
#define __SYSTEM_CLOCK (115000)
I could fix that value in system_samd20.c, but I don't understand how to change SystemCoreClock value at run-time if I use a different clock source (for example, the internal 8MHz oscillator without prescaler).
There is the function SystemCoreClockUpdate(), but it is defined as:
Code: Select all
/**
* Update SystemCoreClock variable
*
* @brief Updates the SystemCoreClock with current core Clock
* retrieved from cpu registers.
*/
void SystemCoreClockUpdate(void)
{
// Not implemented
SystemCoreClock = __SYSTEM_CLOCK;
return;
}