| Welcome to AT91SAM Community Forum http://www.at91.com/samphpbb/ |
|
| Can't make CAN to recieve messages : AT91SAM7X http://www.at91.com/samphpbb/viewtopic.php?f=15&t=3439 |
Page 2 of 2 |
| Author: | GSNT [ Sat Jul 07, 2007 6:13 pm ] |
| Post subject: | |
BTW: just try to transmit a message(without ints) and scope your hardware: Code: //set transmit mailbox
//mailbox 1 transmission low byte first AT91C_BASE_CAN->CAN_MB1.CAN_MB_MID=0x55C<<18; //11 bit Part A ID AT91C_BASE_CAN->CAN_MB1.CAN_MB_MAM=0x00000000; //accept all AT91C_BASE_CAN->CAN_MB1.CAN_MB_MDH=0x87654321; //data high AT91C_BASE_CAN->CAN_MB1.CAN_MB_MDL=0x03345602; //data low AT91C_BASE_CAN->CAN_MB1.CAN_MB_MMR=0x03<<24; //transmit //enable CAN without ABM AT91C_BASE_CAN->CAN_MR = AT91C_CAN_CANEN; //transmit it AT91C_BASE_CAN->CAN_MB1.CAN_MB_MCR =(8<<16)|AT91C_CAN_MTCR; HTH, GSNT |
|
| Author: | hzn [ Tue Jul 10, 2007 6:43 pm ] |
| Post subject: | |
FINALLY!!!! I made it to work.. and Gerd, you were right, the CAN Tranciever was damaged. I replaced it with new one, and everything worked without a code change!. MANY THANKS MAN! I owe you. I think this will be good topic for anyone to refer when working on CAN.\ |
|
| Author: | hzn [ Tue Jul 10, 2007 6:45 pm ] |
| Post subject: | |
And also for ALL: Code: #define CAN_BR_500K 0x00053255
#define CAN_BR_250K 0x000B3255 #define CAN_BR_200K 0x000E3255 #define CAN_BR_150K 0x00133255 #define CAN_BR_125K 0x00173255 #define CAN_BR_100K 0x001D3255 #define CAN_BR_83K 0x00233255 #define CAN_BR_75K 0x00273255 #define CAN_BR_50K 0x003B3255 #define CAN_BR_25K 0x00773255 Baudrates for AT91SAM7X MCK=48Mhz. ps. if you think you don't have signal propagation time, then last 255 can be modified to 066. |
|
| Author: | GSNT [ Tue Jul 10, 2007 7:05 pm ] |
| Post subject: | |
Glad to hear! And now you're one of the most experienced CAN hard- and software guys. Congratulations! Regards, GSNT |
|
| Author: | kosh [ Thu Sep 02, 2010 3:45 pm ] |
| Post subject: | Re: Can't make CAN to recieve messages : AT91SAM7X |
problem solved -- |
|
| Page 2 of 2 | All times are UTC + 1 hour [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|



Forum