RT1050 External Systick clock source

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1050 External Systick clock source

2,043 Views
michaelwhite
Contributor II

I'm trying to enable the external clock source for the ARM Systick timer on the RT1050 EVKB board.  The only reference I've found in the manual is in section 10.3.2.1, "Crystal Oscillator (XTALOSC)":

NOTE 24 MHz XTALOSC can be the external clock source of SYSTICK.

From the schematics, the EVKB appears to have a 24 MHz oscillator.  If I set the M7 SysTick clock source bit to "Internal", the current value register loads the  reload value and starts counting down.  However, if I set the M7 SysTick clock source bit to "External", the current value register does not change and does not count.

I've poked around in the XTALOSC registers but I don't see anything that would enable a clock to the M7.  Likewise, a search of the reference manual provided no other references to the M7 SysTick and there does not appear to be anything in the clock tree diagrams.  How do I enable the M7 SysTick external clock?

Thanks.

0 Kudos
5 Replies

1,635 Views
michaelwhite
Contributor II

Yuri,

Are you referring to the External bit (CLKSOURCE, bit 2) of the SysTick CTRL register?  If so, that bit is zero - the CTRL register has a value of one, i.e. only the ENABLE bit is set.  And yes, I'm using the SysTick structure from the SDK; here's the contents of that structure after I've initialized it:

SysTick SysTick_Type * 0xe000e010
CTRL volatile uint32_t 1
LOAD volatile uint32_t 14985
VAL volatile uint32_t 0
CALIB const volatile uint32_t 999

The value of "VAL" never changes unless I set CLKSOURCE to 1 (Internal); when CLKSOURCE is set to 1 (Internal) SysTick works as expected.  I've used the external clock for SysTick on other non-NXP ARM processors (M0, M4).

Is there something else I'm missing?

0 Kudos

1,635 Views
michaelwhite
Contributor II

Can you point me to a SysTick example in the SDK that uses the external clock?  All examples I've found use the internal clock.

0 Kudos

1,635 Views
michaelwhite
Contributor II

Yuri,

I've set XTALOSC24M_LOWPWR_CTRLn to 0x74f00 (internal oscillator disabled) and 0x74f01 (internal oscillator enabled); both work the same, in that the processor runs but SysTick does not.  In both of these cases, the XTAL OSC is selected as the source for the 24 MHz clock.  I've looked at the EVKB board and both Y1 & Y2 oscillators are present.

Is there anything else I need to enable to provide the external clock to the ARM M7 SysTick?

0 Kudos

1,635 Views
Yuri
NXP Employee
NXP Employee

Hello,

  

  CLKSOURCE bit in the SYST_CSR should be cleared for external clock (100KHz from 24 MHz of i.MX RT).

ARM Information Center  

  The SDK contains example for the SysTick - use it as base.

Regards,

Yuri.

0 Kudos

1,635 Views
Yuri
NXP Employee
NXP Employee

Hello,

 

   "The 24MHz XTALOSC is the external clock source of the systick. Note that it is divided down to

100KHz before it goes to systick. Also note that in case XTALOSC24M_LOWPWR_CTRLn[OSC_SEL]

is set the whole chip’s 24Mhz clock will be from RCOSC.

   The 24MHz crystal must exist [...] . In low power modes user may disable the 24MHz crystal but before

that they must enable the 24Mhz RCOSC otherwise the system fails."

 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos