We found the issue which was in the voltage supplied to the transceiver. And we fixed this by supplying necessary voltage. Now everything is working fine.Thanks for your continuous support.
I checked in the scope too, By tapping TXD and RXD of CAN transceiver.
In this case i saw that , In RXD there is always 1 bit missing, so there after is starts throwing an error frame.
So can you help me out in tracing out where the exact problem is?
Seems a scope trigger is not synchronized, and you just stopped the scope. I think you are getting this kind of signal, which says error frames are generated and you periodicaly entering and leaving bus off state. It is because permanent error on the bus.
Try to unconnect can module from the transceiver and just connect TX RX pins together, assuming internal pull ups are used on RX pin. Then you should get following on TX line. Message must be transmitted still. This is because it is not acknowledged from other node.
If you see a correct message, then there is some issue with transceiver or a bus. Try to use lower baud rate.
Thanks for your comments,
To provide little more information, we are trying to use CAN_F and we changed the code accordingly by referring the manual.. I am attaching the modified code as below. In the main case 0 for transmission is happening and waiting in "Poll CAN Tx flag to track successful transmission"
Kindly let us know, whether we need to change anything else.
Hello Mr Stancik,
Thank you so much for responding. I am using sample code named "MPC5668x-FlexCAN-Tx2RxFIFO".
As per my knowledge, right baud rate is being used. And i modified the code to use FLEX CAN_F port.
But still i am getting an error. If yolu have any inputs, please let me know.
What sample code do you use? Do you communicate between MCUs FlexCAN modules or with some external device?
It looks either pins are not properly configured or wrong CAN bit timing is used.
A Stuff error must be detected and interpreted as such at the bit time of the sixth consecutive equal bit level (6 consecutive dominant or 6 consecutive recessive levels), in a message ﬁeld which should be coded by the method of bit stufﬁng.
Stuff bits produce edges in the bit stream for the purpose of resynchronization.
This all lead for the issue with the bit timing, as I mentioned above.
For the Can bit timing calculation you can refer to a following document;
We are discussing with you in the NXP community discussion.
We have attached the code, where we were trying to use CAN F and standard CAN ID for transmission. We are getting stuff error and stuck in case 1 for CAN F’s Tx flag for successful transmission. we checked for Bit timing also.
Could you please check and provide quick update and it will help to proceed further.
Thanks in advance for your support