I'm sending my entire project.
This project I got from the Freescale site and modified it a little (just changed the ports where my hardware were connected). The program was originaly designed for the MC9S08GB60 to be used with te MC13192, but I'm using the MC9S08GB32.
The variable that I'm having problem with is the "Timer_Goal", but there must be other variables with problems, but I couldn't find which ones exactly.
What happends is that this variable changes to a negative number without reason making the timer to stop too soon.
Also, I am using the version 3.1 of Codewarrior.