Hello folks,
Thanks for the replies. My problem was the timer code wasn't quite making sense to me in terms of using a counting up value, and the low overflow threshold.
The FRDM-KL46Z is very similar to the Kinetis boards. The PIT module has two 32-bit channels each running at 24mhz. The channels can be chained together.
The solution I came up with is to use one channel for the time now value, and the other channel to provide the RIOT timer. Also, I modified vtimer, hwtimer, and board timer code to use 64-bit unsigned integers for the tick values - now a overflow doesn't happen until some 59,000+ years from boot, not in a few seconds as was previously happening.
I highly suggest going with a different implementation for the higher level timers to use a larger integer, or split it into seconds & microseconds (like timex_t). A 32-bit value is just way too low since a 1-mhz timer will overflow in just over a hour, or in a few seconds for boards like the KL46Z or Kinetis which have a higher clock rate.
The particular project I want to use this on has the requirement of both using short timers, in microseconds & seconds, and long timers that have durations in hours.
Thanks again for the help,
-- Michael