Re: Re: tpu initialization...
Eric McRae <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
csuozzo wrote:
> Yep, within main() I declare:
>
> struct TPU3_tag *tpua = &TPU_A;
>
> utilizing the framework layed out in m_tpu3.h with the base address
> of TPU_A being defined in mpc555.h in conjunction with m_common.h. In
> my tpu initialization c file, I assign values to: TPUMCR, TPUMCR3,
> TICR, CPR0, CPR1, CFSR3, HSRR1 and the PARM[][]. Stepping further
> through this function in debug mode, I've found the parameter ram is
> the only part of that function that actually assigns my values...
>
> > (step by step), I notice that none of the lines of code that assign
> > values to the tpu registers actually change those values (starting
> at
> > 0x30400 for tpua). They all retain their original value of
> 0xFFFF.
> > Ex.
> > tpua->TPUMCR.R = 0x6020;
> > doesn't do anything; the value in this register following execution
> of
> > this line of code is still 0xFFFF.
I don't use the mpc555.h files but this sounds like an access size
problem. DPTRAM will respond reasonably to 32 bit accesses but most of
the TPU setup registers are 16 bit values. It's also possible that the
code is correct but that your debugger is doing a 32 bit read and
displaying the wrong half of the data.
--
Eric McRae, Electro-Logic Machines, Inc.
511 Root St., Port Townsend WA, 98368
Phone/Fax: 360.379.0969, http://www.elmi.com
-----------------------------------------------------------
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/