LPC11c24 30 ms systick interrupt possible ?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC11c24 30 ms systick interrupt possible ?

1,262 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by qwerty1 on Sun Dec 14 02:36:49 MST 2014
Hello,

I am trying to configure an interrupt which should occur each 30 ms using the systick.

Do you think it is feasable to count 3  10 ms triggers and then set a flag in order to trigger the can interrupt ? As far as i've understood from the user manual, the 10ms is fixed, the tick clock frequency could be variable ...

RELOAD = (system tick clock frequency x 10 ms) 1 = (50 MHz x 10 ms) -1 = 500000-1 = 499999 = 0x0007A11F.

As i'm not that experienced, any advice counts.

Thanks.
标签 (1)
0 项奖励
回复
4 回复数

1,162 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by qwerty1 on Sun Dec 14 03:39:30 MST 2014
thank you very very much !
0 项奖励
回复

1,162 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Dec 14 03:32:21 MST 2014

Quote: qwerty1
SysTick_Config(50E3*30) i should get it at 30 ms right ?



Yes  :)

50E3*30 = 1.5E6

That's 1/33 of your main clock and so generating 1/33 sec interrupts...
0 项奖励
回复

1,162 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by qwerty1 on Sun Dec 14 03:26:07 MST 2014
Thank you for your answer, so if i do it like

SysTick_Config(50E3*30) i should get it at 30 ms right ?

Thanks for your help
0 项奖励
回复

1,162 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Sun Dec 14 03:07:26 MST 2014
CMSIS or LPCOpen is helping you to setup your SysTick 

Sample:

SysTick_Config(SystemCoreClock/10); //set 100ms timer


Now Systick is reloading 1/10 of a second = 100ms...

Of course you can also set a relad value:

SysTick_Config(50E3); //set 1ms timer in 50MHz system


With 50E6 / 1000 = 50E3 SysTick is triggered every 1/1000 s = 1ms
0 项奖励
回复