Hi Everyone. I'm running a code on my DSP56824EVM, and I found the "Interrupt Service Routines" or IRS, specifically: pmemwrite((WORD)0xE9C8,(WORD)0x0010); // Write JSR instruction pmemwrite((WORD)Irqa_ISR,(WORD)0x0011); // IRQA's ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0012); // Write JSR pmemwrite((WORD)Irqb_ISR,(WORD)0x0013); // IRQB's ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0020); // Write JSR instruction pmemwrite((WORD)SSI_rx_isr,(WORD)0x0021); // SSI Rx ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0022); // Write JSR pmemwrite((WORD)SSI_rx_isr,(WORD)0x0023); // SSI Rx w/error address Can anybody tell me what they are, and where can I find a *.pfd file ( on the Codewarrior or the SDK CD) that explains this???? Thanx a lot JosAntonio S. |
|
Assembler Instruction
Started by ●June 13, 2002
Reply by ●June 14, 20022002-06-14
Hi Jose, I will try to answer your question if I do understand. You want to know what is pmemwrite. It s a function define i a c envirronement but the code is written in assembly. This function is use mainly if you want to write to your flash program memory. The motorola dsp has that function you can consult your motorola user book to know the procedure to erase or write single or page memory word. it s Nice for you interrupt. This is the code for pmemwrite. Fpmemwrite: MOVE Y1,R0 ;move contains of y1 to r0 which is the adress of interrupt NOP ;see user book for that nop MOVE Y0,P:(R0)+ ; write the contains of y0 to the adress pointer by r0. rts Example. pmemwrite((short)0xE9C8,(short)0x0010); /* JSR instruction */ pmemwrite((short)irqaisr,(short)0x0011); /* Address */ After this 2 instructions you will get at the adress 0x0010 the value E9C8 which is a jsr Then at adress 0x0011 you will wrtie the adress od the jsr which equivalent to the label irqaisr. I can refer you the example in the metrowerks directory C:\Program Files\Metrowerks\CodeWarrior\CodeWarrior Examples\56824evm\isproj Open the project and the file asm and you will get the code. I hope this will help you Erwan Petillon ----- Original Message ----- From: josalfe2002 To: Sent: Thursday, June 13, 2002 9:30 PM Subject: [motoroladsp] Assembler Instruction Hi Everyone. I'm running a code on my DSP56824EVM, and I found the "Interrupt Service Routines" or IRS, specifically: pmemwrite((WORD)0xE9C8,(WORD)0x0010); // Write JSR instruction pmemwrite((WORD)Irqa_ISR,(WORD)0x0011); // IRQA's ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0012); // Write JSR pmemwrite((WORD)Irqb_ISR,(WORD)0x0013); // IRQB's ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0020); // Write JSR instruction pmemwrite((WORD)SSI_rx_isr,(WORD)0x0021); // SSI Rx ISR address pmemwrite((WORD)0xE9C8,(WORD)0x0022); // Write JSR pmemwrite((WORD)SSI_rx_isr,(WORD)0x0023); // SSI Rx w/error address Can anybody tell me what they are, and where can I find a *.pfd file ( on the Codewarrior or the SDK CD) that explains this???? Thanx a lot JosAntonio S. _____________________________________ Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer. You need to do a "reply all" if you want your answer to be distributed to the entire group. _____________________________________ About this discussion group: To Join: To Post: To Leave: Archives: http://www.yahoogroups.com/group/motoroladsp More Groups: http://www.dsprelated.com/groups.php3 |
Reply by ●June 18, 20022002-06-18
Hi there Jos I am taking a shot in the dark here, but that command looks a lot like the "periphMemWrite" command I use. You will find documentation on this and other commands in the Embedded SDK programmer's guide (from p 5-107 onwards). The pdf file for the programmer's guide is at: <cd-rom>\sdk\program files\Motorola\Embedde SDK\help\pdf\pdf\SDK_Programmer's_Guide.pdf The listing of all the register addresses you will find from p 3-14 in the DSP56F80x User's Manual. The pdf file for the user's manual is at: <cd-rom>\sdk\program files\Motorola\Embedded SDK\help\pdf\pdf\processors\manuals\DSP56F801_7UM.pdf Regards Roelof Oelofsen >>> "josalfe2002" <> 06/13/02 09:30PM >>> |
Reply by ●June 18, 20022002-06-18
Hi Jose, Here is what our support team said. Jose, This section of code is looking to define a series of ISR's. This particular code snippet uses the pmemwrite() function in this case because the ISR's belong in the lower part of P memory and C pointers cannot be used (a fairly typical way this could be done in C code) as they only provide access to X memory on the DSP568xx family through CodeWarrior. However, you can also do this by defining the ISR's in a separate .c or .asm file and locating them using the linker command file. To see more description about ISR's on the DSP56824 you will need to look at the DSP56824 User's Manual which you can find in the "Help and Documentation" portion of the SDK. Chapter 16 which is the Programmer's sheets shows the Interrupt Vectors listed in order of address, specifically look at 16.2. To find out more about the pmemwrite() function used in this snippet of code, I suggest you take a look at page DSP-152 in the Targeting_DSP56800.pdf which comes in the CodeWarrior installation. There is an explanation there......... Hope this info helps! Regards, > Hi Everyone. > I'm running a code on my DSP56824EVM, and I found the "Interrupt > Service Routines" or IRS, specifically: > pmemwrite((WORD)0xE9C8,(WORD)0x0010); // Write JSR > instruction > pmemwrite((WORD)Irqa_ISR,(WORD)0x0011); // IRQA's ISR address > pmemwrite((WORD)0xE9C8,(WORD)0x0012); // Write JSR > pmemwrite((WORD)Irqb_ISR,(WORD)0x0013); // IRQB's ISR address > pmemwrite((WORD)0xE9C8,(WORD)0x0020); // Write JSR > instruction > pmemwrite((WORD)SSI_rx_isr,(WORD)0x0021); // SSI Rx ISR address > pmemwrite((WORD)0xE9C8,(WORD)0x0022); // Write JSR > pmemwrite((WORD)SSI_rx_isr,(WORD)0x0023); // SSI Rx w/error > address > Can anybody tell me what they are, and where can I find a *.pfd file > ( on the Codewarrior or the SDK CD) that explains this???? > > Thanx a lot > JosAntonio S. |