AnsweredAssumed Answered

K70 SysTick Clock Source Bit

Question asked by Peter McLean on Sep 9, 2015
Latest reply on Sep 10, 2015 by Peter McLean

Hi All,

 

I'm using the K70 SysTick Timer and referred to the K70P256M150SF3EM manual, section 3.2.1.2 on page 85 which says that the CLKSOURCE bit in the SysTick Control and Status Register is always set to select the core clock. However, if I have this line in KDS3.0.0:

 

  SYST_CSR = (SysTick_CSR_ENABLE_MASK | SysTick_CSR_TICKINT_MASK);

it does not generate an interrupt - which means SysTick is not ticking. If I use:

 

  SYST_CSR = (SysTick_CSR_ENABLE_MASK | SysTick_CSR_TICKINT_MASK | SysTick_CSR_CLKSOURCE_MASK);

I do get an interrupt.

 

I thought the value of CLKSOURCE was always set and not writable, so the first bit of code is all that is needed?

Since that code writes a 0 to the CLKSOURCE bit, does that mean it is writable, and therefore not always "set"?

 

Thanks!

Outcomes