Critical bug on stopwatch library at lpcopen_2_10_lpcxpresso_ea_devkit_1788.zip

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

Critical bug on stopwatch library at lpcopen_2_10_lpcxpresso_ea_devkit_1788.zip

410件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by C6H6 on Thu Apr 14 11:32:27 MST 2016
I found a critical bug on stopwatch library.

At StopWatch_Init function, it calculates ticks per seconds by this:


ticksPerSecond = Chip_Clock_GetSystemClockRate() / prescaleDivisor / 4 ;


but this is wrong method when SystemClock is 120MHz, and Pheripheral Clock setting at 60Mhz (PCKDIV has been set at 2, by default startup code).

This code has wrong method to calculate ticks. So, I was replace code like this, and operating normaly.

ticksPerSecond = Chip_Clock_GetPeripheralClockRate() / prescaleDivisor ;



Please fix this problem for new beginners get right library.
ラベル(1)
0 件の賞賛
返信
1 返信

389件の閲覧回数
lpcware
NXP Employee
NXP Employee
bump
0 件の賞賛
返信