Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 2nd August 2007, 12:53 AM   (permalink)
Default Explain diab 4.2b PowerPC family asm macros

My Embedded Application runs on Motorola PowerPC MPC555 Microcontroller. The cross compiler is Diab 4.2b. Following is a macro for raising and restroing interrupts in MPC555.

asm unsigned int iplm_raise(void)
{
! "r3"

mfmsr r3
mtspr 81,r1
}

asm void iplm_restore(const unsigned int mask)
{
%reg mask ;
! "r12"

mfmsr r12
rlwimi r12,mask,0,16,16
mtmsr r12
}

The calls to these asm macros are as follows:

unsigned_32 mask;

RAISE_IPLM(mask) ;

/* critical section of code */

RESTORE_IPLM(mask) ;

Following are links:

1) Link to MPC555 Manual - pages of interest are 3-20 to 3-23
http://www.freescale.com/files/micro...UM.pdf?fsrch=1

2) Link to MPC555 Instruction Set - Section 9 is of interest
http://www.freescale.com/files/micro...RM.pdf?fsrch=1

3) I could not find a link to Diab 4.2b Target User's Manual for PowerPC Family. However, I have soft copy
of this manual. This manual explains asm macros. I'll tried attaching it but I get an error. I am asked to contact tech. support but they never responded me. Can someone help me attach this manual? Thanks.

Please explain above two macro in detail, line by line. Thanks.
naseeam is offline   Reply With Quote
Old 2nd August 2007, 05:32 PM   (permalink)
Default

Diab Target User's Manual should be at www.windriver.com. Registration will be required in order to access the document.
naseeam is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




All times are GMT. The time now is 07:07 PM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.