RE: AN 1776
Dobbin Allan-r11834 <[email protected]>
| Newsgroups | gmane.comp.hardware.motorola.microcontrollers |
|---|---|
| Message-ID | <45E41B46B1F8D81183E4000F20D7C40B044C7182@az33exm40-bu.am.freescale.net> |
The app note is for MC683xx family, not the powerPC MPC500 family. Although most of the note applies in general and to the Toucan module, the MC683xx assembler instructions are not valid. The set_ip function is also purely for MC683xx and is not valid for MPC5xx. CAN_IARB - there should be a space between "CAN_IARB" and "2" i.e. CAN_IARB is defined as 2. I hadn't noticed this before. Anyway, there are slight differencies betweem the MC68300 Toucan and the MPC500 toucan - IARB is one of them. IARB does not exist on MPC500 family, so this has to be removed anyway. Regards, Allan -----Original Message----- From: kshanthi03 [mailto:[email protected]] Sent: Monday, April 04, 2005 9:28 AM To: [email protected] Subject: [MPC500] AN 1776 Hi, i am trying to implement This AN 1776 application notes Stereo Audio Transmission Over The CAN Bus Using The Motorola MPC 555 With TouCAN Module. in the toucan.c module the function set_ip;an assemberler instruction is requried to access the satatus register. i am using VISUAL-X tools complier. when i am trying to compile this code void set_ip (int ip) { switch (ip) { case 0: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF0FF,SR" ); break; case 1: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF1FF,SR" ); break; case 2: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF2FF,SR" ); break; case 3: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF3FF,SR" ); break; case 4: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF4FF,SR" ); break; case 5: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF5FF,SR" ); break; case 6: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF6FF,SR" ); break; case 7: default: asm(" ORI.W #0x0700,SR", " ANDI.W #0xF7FF,SR" ); break; } the error is :argument of asm is not constant string, then i try to write like this case 0: asm(" ORI.W #0x0700,SR"); asm(" ANDI.W #0xF0FF,SR"); break; then the error is unrecognized opcode ori.w ,andi.w can some body help me in this regard i am quit new this field of embeded systems. i think my complier is not able to undersatnd this code. one more in toucan1.h defined #define CAN_IARB2 /* TouCAN Interrupt arbitration, 1-15 if interrups enabled */ but its used in in toucan .c like this /* Enable TouCAN clocks and put into debug mode. Set user defined bits */ CANMCR = (FRZ%2 <<14) | BIT12 | (WAKEMSK%2 <<10) | (SUPV%2 <<7) | (SELFWAKE%2 <<6) | (APS%2 <<5) | (CAN_IARB%8)this not declared any where. may be my knowledege is not reaching up to this so i request the group help in this regard¨ regards shanthi ----------------------------------------------------------- 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/