LPCOpen MRT sample errors

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

LPCOpen MRT sample errors

956 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Jan 07 00:08:56 MST 2015
LPCXpresso LPC1549 board LPCOpen V2.08c - periph_mrt sample is including several inversion errors...

Wrong:
setupMRT(2, MRT_MODE_ONESHOT, 2);/* Will fire in 0.5 seconds */
...
setupMRT(0, MRT_MODE_REPEAT, 2);/* 2Hz rate */

Corrected:
setupMRT(2, MRT_MODE_ONESHOT, 2);/* Will [color=#f00]not[/color] fire in 0.5 seconds */
...
setupMRT(0, MRT_MODE_REPEAT, 2);/* [color=#f00]no[/color] 2Hz rate */


Surprisingly enough, setting interval time to (MainClockRate / 2) isn't working  :((

Instead expected 72E6 / 2 = 36E6 interval timer is set to 2445568 (= 36E6 AND 0xFFFFFF) , causing a 29 Hz rate 

I'm not sure why these timers are 24bit in a 32bit world, but obviously that's still surprising  :~

标签 (1)
0 项奖励
回复
1 回复

911 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Jan 07 21:11:00 MST 2015

Quote: R2D2
I'm not sure why these timers are 24bit in a 32bit world, but obviously that's still surprising  :~



No bits leftover after including 48bit RIT  :D
0 项奖励
回复