RE: Read MASKNUM from C?

"Dobbin Allan-r11834" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <4147ED8B92A864498825C07E53594E4A753E49@az33exm20.fsl.freescale.net>
For Diab and Codewarrior, you can use:

asm UINT32 Read638(void)
{
	mfspr r3,638
}	


Regards,
Allan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of Farkas, Les
Sent: Tuesday, January 31, 2006 10:47 AM
To: [email protected]
Subject: RE: [MPC500] Read MASKNUM from C?


This works under Green Hills.  There is a similar Syntax for Diab.

#pragma inline read_638
__asm U32
read_638(void)
{
%
 mfspr r3,638
}

-Leslie

> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Cooper, Jim
> Sent: Tuesday, January 31, 2006 11:35 AM
> To: [email protected]
> Subject: [MPC500] Read MASKNUM from C?
> 
> 
> Hi All
> 
> Can anyone help me with some code that will let me determine
> the MASKNUM of a MPC555 from inside a C program?
> 
> Presently I am determining the MASKNUM either from reading
> the labeling on the part or looking at IMMR (SPR638) during 
> debug.  Both of these require manual intervention.
> 
> I would like to automate checking MASKNUM as part of our
> board test and verify that it is an acceptable version, and 
> if it is not, give an error message to the tester.
> 
> I think I am looking for is some assembly code that can be
> embedded in-line in my C program that will return the IMMR to C.
> 
> Our present boards have had problems with versions before K2
> and the new M version.  We are trying to use only K2 or K3 versions.
> 
> 73
> Jim Cooper
> ASYMTEK
> [email protected]
> 
> 
> -----------------------------------------------------------
> To learn more about Freescale Microcontrollers, please visit
> http://www.freescale.com/mcu
> 
> 
>  
> Yahoo! Groups Links
> 
>     http://groups.yahoo.com/group/MPC500/
> 
> 
>  
> 
> 
> 


-----------------------------------------------------------
To learn more about Freescale Microcontrollers, please visit
http://www.freescale.com/mcu


 
Yahoo! Groups Links



 




-----------------------------------------------------------
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.