RE: Re: TPU3: alternate PTA and DIO

<[email protected]> Mon, 11 Dec 2006 16:12:01 -0500
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <631DE9E22D35CE409D3AD884433621260E896D10@galmismb02.napa.ad.etn.com>
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:[email protected]] 
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]