Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Sat Jul 07, 2007 6:13 pm 
Offline

Joined: Mon May 02, 2005 12:17 pm
Posts: 137
Location: Germany
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 6:43 pm 
Offline

Joined: Tue Oct 10, 2006 9:04 am
Posts: 9
FINALLY!!!! :P

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.\


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 6:45 pm 
Offline

Joined: Tue Oct 10, 2006 9:04 am
Posts: 9
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 10, 2007 7:05 pm 
Offline

Joined: Mon May 02, 2005 12:17 pm
Posts: 137
Location: Germany
Glad to hear!
And now you're one of the most experienced CAN hard- and software guys.
Congratulations!

Regards,
GSNT


Top
 Profile  
 
 Post subject: Re: Can't make CAN to recieve messages : AT91SAM7X
PostPosted: Thu Sep 02, 2010 3:45 pm 
Offline

Joined: Tue May 04, 2010 11:29 am
Posts: 6
problem solved --


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: