Yahoo Groups archive

68300

Index last updated: 2026-04-29 00:01 UTC

Message

Re: [68300] 32 bit timer on TPU on 68376

2003-12-05 by Ray Pimm

I've written several 32-bit timer/counter TPU microcode routines for 
various applications. TPU microcode can get a bit tricky, as Charlie's post 
illustrates.

You need to have a very clear understanding of the TPU operation to get the 
coherent update correct, and to maintain timing accuracy under all conditions.

One approach is to hook together standard TPU functions as Charlie 
suggests. The advantage is that the functions are well documented and 
mature. But you may not be able to get the exact function and performance 
that you want with this approach. And there is always the possibility of 
some undocumented side effect occurring.

Writing your own TPU function is not easy, but you get exactly what you 
need, providing you know what you are doing of course. Unfortunately the 
available TPU microcoding documentation is patchy, and doesn't deal all 
that well with some very low level details of pin timing needed to avoid 
scenarios such as Charlie described. I spent many hours several years ago 
paining over low level timing details such as this when designing a 
particular routine for a client.

Ask Charlie for a copy of the Verilog code if you really want to understand 
the TPU pin timing.

Regards - Ray Pimm

At 11:40 PM 3/12/2003 +0000, you wrote:
>Hello List,
>
>I am trying to write a 32 bit timer routine in TPU microcode for the TPU
>in a 68376.
>
>I seem to be having a timing problem when a match = $0000 (MRL = 1) and 
>the micro instruction
>
>p:= ert;
>ram p -> @LYD_TIMER_B.
>
>For my application I need a high resolution (200nS) and measurements down 
>to .1Hz.
>
>Has anybody been able to implement a 32 bit timer on the TPU to measure 
>frequency.
>
>I would like to hear from somebody who any knowledge on the subject.
>
>Aage Christoffersen
>Lydatronic
>Brisbane, QLD
>Australia
>
>aage@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.