My MPU is MC9S12XEP,and it has 4 CAN channel,i use CAN0,1,4.
I config CAN4 outpin to PM4,5.
The config functions is almost same,
After configuration,
CAN0CTL0 = 0x14;
CAN1CTL0 = 0x14;
CAN4CTL0 = 0x04; //no SYNCH
and the result is CAN0,1 woks fine,but no pulse output from PM4,5.
Hi,
SYNCH - Synchronized Status—This read-only flag indicates whether the MSCAN is synchronized to the CAN bus and
able to participate in the communication process. It is set and cleared by the MSCAN.
0 MSCAN is not synchronized to the CAN bus
1 MSCAN is synchronized to the CAN bus
Yes, it would be nice to have good description of what is MSCAN synchronized to the CAN bus.
In BOSCH CAN specs I see this:
On wake-up, the internal activity is restarted, although the transfer layer will be waiting for
the system’s oscillator to stabilize and it will then wait until it has synchronized itself to
the bus activity (by checking for eleven consecutive ’recessive’ bits), before the bus
drivers are set to "on-bus" again.
Edward
Hi.
Does it mean the synchronization is all about MSCAN and CAN transceiver,no matter with end of PC?
Does the eleven consecutive recessive bits come from CAN transceiver or not?But I think the answer is YES.Because on my board,the other two MSCAN were initialized ok with SYNCH bit setted,and no end of PC linked with it.
发自我的 iPad
在 2018-8-10,14:38,"kef2" <admin@community.nxp.com<mailto:admin@community.nxp.com>> 写道:
NXP Community <https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>
Re: Why does CANCTL0.SYNCH always equal to ZERO!?
reply from Edward Karpicz<https://community.nxp.com/people/kef2?et=watches.email.thread> in S12 / MagniV Microcontrollers - View the full discussion<https://community.nxp.com/message/1044758?commentID=1044758&et=watches.email.thread#comment-1044758>
Hi
Are you sure transceiver is OK? Where you able to see continuous pulses on TX and RX when nothing is connected to the bus and you let MSCAN to send message? Perhaps you failed to route specific MSCAN instance to proper pins?
Edward
Hi,
as I wrote in the surveys system....
One thing I have to solve is...Which device you use. Could you please provide exact number...everything you can see on the device.
You have not provided all info I asked for. (schematic, SW example) However, I would describe experience I have.
- I have not investigated why, but sometimes has happened to customer that when two different transceivers were used, even they looked to be compatible, the bus was not working.- I really suggest to use prcedure I already use when I am in troubles:1) loopback mode on one CAN peripheral....result is whether peripheral is OK or not.2) Communication of two CAN peripherals on the same device without CAN transceiver using diode/resistor configuration described
http://canlab.cz/pages/download/Siemens/ap292101-On-Board%20Communication%20via%20CAN%20without%20Tr...
Result: input/output pins are OK or not
3) Connect to the same device or another device via the same type of transceiver.Result: Bus is OK or not
4) You can test any change because all necessary was tested and worked.Result: Test of changes.
Best regards,Ladislav
Hi,lama.
Thank you very much for your help.
My MPU is MC9S12XEQ512,CAN transceiver is TJA1051T and the CAN transceiver device at the end of PC is ZLG USBCAN-II,I think it is a local product and I do not know which CAN transceiver it use which is working with other two CAN transceivers(TJA1052IT) on my board.
I typewrite this email on my ipad,it is not easy to include codes and schematic.
But I estimate the problem will be solved by following four points your suggested,and likely I wil change the CAN transceiver.Though I also do not know the steps of can synchronization.^^
Thanks again.
Best regards.
发自我的 iPad
在 2018-8-9,19:39,"lama" <admin@community.nxp.com<mailto:admin@community.nxp.com>> 写道:
NXP Community <https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg>
Re: Why does CANCTL0.SYNCH always equal to ZERO!?
reply from lama<https://community.nxp.com/people/lama?et=watches.email.thread> in S12 / MagniV Microcontrollers - View the full discussion<https://community.nxp.com/message/1044354?commentID=1044354&et=watches.email.thread#comment-1044354>