MSCAN problem DEMO9S08DZ60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MSCAN problem DEMO9S08DZ60

1,107 Views
nishant_khanna
Contributor I
Hi,
 
I am trying to get the MSCAN to work on the DEMO9S08DZ60, been trying to transmit a CAN message.  But while transmitting i am not able to clear the appropriate TEXn bit, the code seems to be ok, just that i am not able to write to this register CANTFLG.  The CAN1_Init routine has been generated from the processor expert. 
 
I tried to set the CANBTR0 and CANBTR1 to 0x00 and then i could see that i am able to clear the appropriate TEXn in the CANTFLG to 0 to begin transmission, ofcourse it remains stuck at 0 then.  But then when i program these registers to TSEG1 as 5 and TSEG2 as 1 and prescaler as 1 to get a bit rate of 125kbps i am not able to clear the TEXn bit again.
 
FYI, i am using the board as it is, not connecting it to any CAN bus or any CAN tool, the loopback mode is enabled...i am wondering if it has anything to do with the face that there is no CAN bus available.
Pls advice.
 
thanks
Labels (1)
0 Kudos
1 Reply

248 Views
ProcessorExpert
Senior Contributor III

 

Since we don't have more information about your specific setup, it is hard to determine the reason of your problem. However, attached project (intended for EVBS08DZ60 STARTER KIT board) shows a communication via CAN bus in loopback mode.

best regards
Vojtech Filip
Processor Expert Support Team
UNIS

 

 

InitMSCAN1.zip


Message Edited by t.dowe on 2009-10-27 12:13 PM
0 Kudos