Re: TPU3: alternate PTA and DIO

"trailrunner23" <[email protected]> Mon, 11 Dec 2006 23:43:33 -0000
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <[email protected]>
I've never tried what you're doing, and I'm so used to using the C API
that I can't answer your questions about the low-level details. I can
say, though, that I've always found that once I get something to work,
something in the manual that I did not understand suddenly becomes
clear. Can you try using the C API?

Joe

--- In [email protected], <StevenASchroeder@...> wrote:
>
> I'm not using the C API, but have referenced it.  The first thing I do
> when switching to DIO is clear the CPR.  I've inserted a delay (500us)
> after this, before setting up DIO and it didn't help.
> 
>  
> 
> If I never enable PTA, but write 15 to the function select register
> (with CPR=0 and HSR=0) I can not get DIO to work.  Is it possible to
> stop PTA?  I have to believe that 500us is enough time to finish.  I'm
> stumped.
> 
>  
> 
> Thanks,
> 
> Steve
> 
>  
> 
>   _____  
> 
> From: trailrunner23 [mailto:joep@...] 
> Sent: Sunday, December 10, 2006 2:30 PM
> To: [email protected]
> Subject: [MPC500] Re: TPU3: alternate PTA and DIO
> 
>  
> 
> Hi Steve,
> 
> I'm assuming you are not using the C API functions available from
> Freescale. Whenever you call a channel init function via that API,
> such as tpu_dio_init_input_immed() or tpu_pta_init(), the first step
> is to call tpu_disable(), and the comments contain this warning:
> 
> WARNING: The channel must be stopped before it is reconfigured. The
> function disables the channel but if it is currently being serviced it
> would continue.
> 
> If you're not using that API, you should look at it to see if there is
> a step or requirement you are missing.
> 
> Joe
> 
> --- In [email protected] <mailto:MPC500%40yahoogroups.com> ,
> <StevenASchroeder@> wrote:
> >
> > I am using PTA to measure a signal's period. No problem. If there is
> > not a transition within X ms I need to check if it is high or low. I
> am
> > trying to switch, in that case, to the DIO input function. All I get
> > for PIN_LEVEL is 0x0000. (My DIO input works fine by itself.)
> > 
> > Is there some magic to switching functions? I set CP=0 and HSR=0
> before
> > setting up the DIO.
> > 
> > Steve
> >
> 
>  
> 
> 
> 
> [Non-text portions of this message have been removed]
>