RE: TouCAN: receive what you just sent?

"Dobbin Allan-r11834" <[email protected]>
Newsgroups gmane.comp.hardware.motorola.microcontrollers
Message-ID <4147ED8B92A864498825C07E53594E4A753BC8@az33exm20.fsl.freescale.net>
If you want to test external loopback, you need two (or more) CANs
otherwise you won't get the frame ACK'ed and transmission won't
complete.

So assuming you have two (or more) transceivers, connect all of the
CAN_HI together and all of the CAN_LO together and then add a resistor
(60 to 120 ohm) between HI and LO to form a small CAN bus.  With this,
you can have the CAN modules talking together. You can also have one
TouCAN receiving its own frames so long as the 2nd CAN is still
connected at same baud to providethe ACK.

To receive all packets, clear the mask register to all 0's and set up
one MB to receive extended frames and another to receive standard
frames.  You can do this on either or both of the Toucan modules i.e.
you can use one CAN to receive the other's frames or to receive its own
frames. Of course, the ACK will be provided by the other CAN so long as
the bauds are the same regardless of whether or not you have any MBs set
up to receive that particular ID.

CAN transceivers ALWAYS do a rx at the same time as tx.  They have to or
else the can protocol/arbitration would fail on the first bit
transmitted.  The transmitted message, or rather, the message appearing
on the bus, has to be echoed back to all CAN nodes including the one(s)
that are currently transmitting. The TJA1050 does the same, so your
"external loopback" is provided by default, but as stated above, you
need to connect to a second CAN node to get an ACK.  Not sure what you
mean by 'slowness' - the TJA1050 provides high speed CAN up to the max
allowed by the CAN spec. i.e. 1Mbps.

Early TouCAN devices did have an internal loopback mode then it was
removed.  On newer devices featuring Flexcan, internal loopback is back
again. You'd have to check your specific device - look for a "LOOP" or
"LPB" control bit in the control, control 0 or control 1 register, but I
suspect there is none on the 565/566. Other than removing the necessity
to connect the rx and tx pins together or to a transciever, the main
feature of this is that it ignores the ACK bit so you don't need a 2nd
node.

- Allan

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf
Of richardtcorey
Sent: Wednesday, November 09, 2005 7:35 PM
To: [email protected]
Subject: [MPC500] TouCAN: receive what you just sent?


Hi

I'll be working with the MPC565/MPC566 TouCAN peripheral soon.  Is 
there any way to configure it to recieve all the packets it sends?  

I'm not looking for the internal loopback mode, I'm hoping to test that 
packets are getting all the way out through the external transceiver.  
I would like to get loopback all the way to CAN_HI and CAN_LO, not just 
TX and RX.

Is it typical that transcievers for CAN do not support TXD-and-RXD live 
at the same time?  We plan to use TJA1050 transciever dispite its 
slowness, but would change if we could get a built-in external loopback 
diagnostic feature.

By the way - I couldn't find an internal loopback mode for TouCAN 
either.  Am I right that there is none?

Thanks in advance.

Rick Corey 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/dN_tlB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------------
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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.