I am trying to transmit and receive an 8 byte data through can tx and rx pins.I have 2 tms320f28069 experimental boards connected through 3.3V V232 can transceivers.120 ohms terminations are given at each node. The problem is that receiver is not receiving any messages. The CANRMP registers remains at 0x00000000 and hence the while loop which checks the condition goes into an infinite loop.
Another problem is that the message transmitted on one end is reflected at the receive pin of the same controller. I can observe the transmitted data on the CAN lines as well as at the receive pin of the receiver. But the mailbox contents at the receiver side doesnot get updated.
I feel that the transmitter should receive only the acknowledge signal from the other controller (after reception of the message). Can any one help me out because I have a very tight deadline. Pls help!
You are mixing a few points, the physical layer and the DSP/protocol/software. I am responsible for the physical layer / transceivers. A few points to rule out before passing off to the DSP team which is a different forum:
1) by stating 120ohm terminations at "each node" you mean each end of the bus or do you only have 2 nodes? CAN is a bus structure normally and termination is needed at the end of the bus but not every node unless you are using only 2 nodes in point to point.
2) By "receiver is not receiving any messages" what to you mean? Again, all CAN nodes including the transmitting one should have the RXD pins showing the messages (data bits) with the propogation delays as necessary due to location on the bus. Have you put a scope probe on the RX pins to make sure the signals are there or is it the DSP isn't set up right to receive the messages?
3) Your use of reflection on the transmitting node I believe you mean "loop back". Reflection would be signal integrity issues due to transmission line properties and impedence mismatches. In CAN all transceivers are full duples and the receiver will show the transmitted data even on the transmitting node. This is necessary at the protocol level as the transmitting node needs to check it's own transmission for arbitration (ie 2 or more nodes colliding and resolving the arbitration for the bus), errors plus all the other nodes will error check via the CRC plus they will then transmit the ACK. The transmitting node needes to see all the data on the bus so this is a loop back of the receiver. This is very different than the transmitter only receiving the ACK bit.
So please confirm your bus set up and if the data is going out the RXD pins on the transceivers.
Thanks a lot for your suggestions. I have two nodes (28069 boards) with their TX and RX pins connected through twin core shielded cable ( apprxtly 50 cm in length) via 232 can transceiver ics( 3.3 V).I have connected 120 ohms resistors at each node between CANh and CANL lines.The ic connections (tx,rx,Vcc,Gnd ) are done as per the datasheet.
I have pgmmmed node1 to transmit an 8 byte data and I have programmed node2 to receive the same.The problem that I am facing is that when I am transmiting an 8 byte data from node1, the same waveform on the scope is seen at the Rx pin of node1 itself.The red LED onthe control card keeps glowing when I run the program and goes off when the rx pin is disconnected.Does it mean that the pins 31 and 30 (CAN TX and RX ) are shorted and hence I am seeing the same waveform on both sides?
Also, this waveform is observed on the RX pin of node2 while a 3.3V dc is observed on the TX pin of node2. In the recieve pgm, I am checking the CANRMP bit to see whether any messages are pending and then the reception has to take place.But this register shows 0x00000000 even if I force some value into it through the pgm. The mailbox contents shows some erroneous values.How do we verify whether the data is received properly?
As I wrote in the first response you should see the node 1 output on the RX pin of node 1. This is called loopback and it has to be this way for CAN arbitration to work. In CAN arbitration (addressing) any CAN node may try and get the bus and the node with the highest priority address wins. It knows it wins or looses because it also sees what it is transmitting. If you look at the HVD232 datasheet you will see on page one in the logic diagram that the driver and receiver are both connected to CANH and CANL at the same time, thus the RX pin will always show what is on the bus with the loop delay through the receiver (ie if you put the scope probe on you should see R should be approximately 70-100ns delayed vs the D pin (Device Switching Characteristics, page 7 of the datasheet - tloop1 and tloop 2). For more info on how arbitration works and loop times see: http://www.eetimes.com/design/industrial-control/4014279/Signaling-rate-versus-cable-length-the-CAN-bus-timing-trade-off?pageNumber=0
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.