Embedded System help (C language, Keil MCB2300 board)

Soldato
Joined
25 Dec 2002
Posts
2,862
Right, i'm doing some programming at present in C on a Keil MCB2300 baord (based on ARM processor).

I'm trying ot make a stopwatch that uses the inbuilt hardware timer, now it works...but it doesn't count up correctly.

Does anyone have any experience with these systems, as I don't want to post up pages of code unless someone has experiance with the system.

Cheers :)
 
It's a 32 bit timer, operating at 12Mhz. The way it operates on the board is you can set an upper limit on the timer, once this limit is reached it increments a timer overflow register by 1, this is what triggers an interrupt to increment a variable (milliseconds)

The timer limit is set to 11999 to represent 1 ms, as 12000 / 12000000 = 0.001 seconds, or 1 ms.
 
Found out the problem, the uVision software we are using wasn't correctly configured for the boards and as such was setup to use different timer frequencies!
 
Back
Top Bottom