ARMstamp 11U37 Systick control

Questions about the BASICtools and MakeItC
Post Reply
olzeke51
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina

ARMstamp 11U37 Systick control

Post by olzeke51 »

Working with a MultiTasking project, I needed to turn off the SYSTICK timer using the
INTERRUPT() command. I know this is dangerous - I have 5 values to update, and
shouldn't be interrupted by the MultiTask Timer [they are TaskX timing loops; since WAIT()
shouldn't be used]....could/should I hang TIMER1

The online HELP file indicated I could do this :

Code: Select all

 Or you can turn on just the interrupt used by TIMER with --

INTERRUPT(0)
ST_CTRL OR= 2   ' enable the SysTick interrupt
What #define should I use to simulate this value?
'
I couldn't find this definition ST_CTRL in the LPC11U3x.bas file,
Nor the UM10462 under section 24.5.4 System timer, SysTick [page 496]
Section 18.5.1 makes reference to 'TICKINT' value [Table 346]....
'
Gary Olzeke51



basicchip
Posts: 1030
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA
Contact:

Re: ARMstamp 11U37 Systick control

Post by basicchip »

The multitask.bas example uses TIMER1 to switch tasks not SYSTICK.

You can either disable the TIMER1 interrupt

VICIntEnClear0 = (1<<TIMER1_IRQn)

or disable the TIMER1

T1_TCR = 0 ' TIMER1 disable

You should do this at the start of the task in question to avoid a premature interrupt. Just reenable them when your time critical task is done, most likely that task would be finished then.

We did not translate other registers from the C header files, but you could, however Systick is an ARM CPU register defined in core_cm0.h in the CMSIS/include directory of the MakeItC installation.

A Systick interrupt will only increment the TIMER function every 65 msec or so. And it is a very short routine

Post Reply