TPU Problem
"spw_lotus" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
Hi All
I am having problems testing out a few VERY basic TPU functions on my
MPC555. I have written 2 custom TPU functions but whenever I enable
the channel running my second function the whole TPU appears
to 'hang'.
My first function is a simple square wave generator and this works
fine. My second function was to be a channel that detected any
transition in the input pin and then link to another channel to carry
out some other function. But I have not got that far yet!
I have assigned my square wave function (function 14) to channel 0
and set this as high priority. I then assigned my transition detect
function (function 15) to channel 1, however as soon as I enable the
channel 1 by setting it's priority to high (I have also tried low)
then my square wave function on channel 0 no longer outputs a square
wave. Even if I then subsequently disable channel 1 by setting
priority to 0, the channel 0 function still does not work.
I have run both functions on the Ashware simulator and they both run
with no problems.
Note that I am running the TPU3 in TPU1 mode.
I am sure I am doing something very silly but I am new to this stuff
and I just can't see what!
Below I copy my code for function that 'hangs' the tpu. I hope you
can help me solve this.
Many thanks
Steve
CODE FOLLOWS:
%macro MSR_PERIOD 'prm3'.
%entry name = INIT_MES; start_address *; disable_match;
cond hsr1=1, hsr0=1, lsr=x, m/tsr=x, pin=x, flag0=x.
chan TBS := in_m1_c1,
PAC := any_trans,
enable_mtsr.
chan neg_mrl, neg_tdl, neg_lsl;
end.
%entry name = TRANS_MES; start_address *; disable_match;
cond hsr1=0, hsr0=0, m/tsr=1, lsr=x, pin=x, flag0=x;
ram p <- @MSR_PERIOD.
au diob := ert;
chan neg_tdl;
(* ram diob -> @MSR_PERIOD;*)
(* au link := #$10;*)
end.
(*********************************************************************
*)
(* UNUSED ENTRIES - execute an end 1 & 2 were
END_OF_PHASE *)
(*********************************************************************
*)
%entry name = MESSAGE_UNUSED;
start_address END_OF_LINK;
cond hsr1 = 0, hsr0 = 1,lsr=x, m/tsr=x, pin=x, flag0=x.
%entry name = MESSAGE_UNUSED;
start_address END_OF_LINK;
cond hsr1 = 1, hsr0 = 0, lsr=x, m/tsr=x, pin=x, flag0=x.
%entry name = MESSAGE_UNUSED;
start_address END_OF_LINK;
cond hsr1 = 0,hsr0 = 0,m/tsr = 0,lsr =1, pin=x, flag0=x.
-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/MPC500/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/