RE: Read MASKNUM from C?
"Farkas, Les" <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <[email protected]> |
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 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/