LPCOpen MRT sample errors

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCOpen MRT sample errors

958件の閲覧回数
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 返信

913件の閲覧回数
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 件の賞賛
返信