RE: Regarding TPU emulation

"Jean-Christophe MATHAE" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <21F745CCE5EED411A78200104B9D7E94335658@CIRTEM9>
Sasanka,


Here is how I download and run my TPU code in emulation RAM (located at
0x0x302000).

////////////////////////////////////////////////////////////////////////

const BYTE acTPUROM [0x800] = {
#include "myTPUCodeInHex.ASC"
};

void
InitTPUDPTRAM()
{
	while (MPC555::TestBitW (MPC555::RAMBAR, 15))  ;

	if (not MPC555::TestBitW (MPC555::TPUMCR_A, 5))
	{
		const DWORD* pROM = (const DWORD*) acTPUROM;
		DWORD* pRAM = (DWORD*) 0x302000;
		forc (HBOUND (acTPUROM) / sizeof (DWORD))
			*pRAM++ = *pROM++;

		MPC555::SetBitW (MPC555::TPUMCR_A, 5);		// TPUMCR_A.EMU := 1
		MPC555::ResetBitW (MPC555::TPUMCR_A, 10);	// TPUMCR_A.TPU3 := 0
	}
}

//////////////////////////////////////////////////////////////////////////


Jean-Christophe MATHAE

CIRTEM
http://www.cirtem.com

bâtiment la Pointe Bleue
20, voie l'Occitane
BP661
31319 LABEGE cedex
France




-----------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.