2015-05-06 05:52 AM
2015-05-06 08:07 AM
PA11 and PA12, I hope.
And you have it connected to what exactly? A transceiver and another CAN bus device?2015-05-06 08:08 AM
PA11 and PA12, I hope.
And you have it connected to what exactly? A transceiver and another CAN bus device?2015-05-07 01:26 AM
Dear Clive1,
Thank you for reply. yes PA11 and PA12 right. I have connected these to CAN transceiver(SN65HVD230). Schematic is shown below- ________________ Attachments : IMG_20150507_134755.jpg : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0pW&d=%2Fa%2F0X0000000bel%2FIW7qZgw9r4MukgPsmyROqTovXmSXU5faVKr1rwCDxkY&asPdf=false2015-05-07 05:14 AM
What does the ESR register show? Does the other node (you need two to test CAN, a single node always fails) also show an error? If the other node is okay then the transceiver is working.
If you see a high TEC and a bus off (BOFF) status that means you aren't connected to an active bus with another node. Jack Peacock2015-05-08 01:37 AM
Dear Jack Peacock,
I have connected the CAN transceiver at both ends but still no waveform at CRO.2015-05-08 05:58 AM
Hello Guys,
Thank you all for your support. Finally it is working now. I made 2 changes... 1. In code I did thisCAN_InitStructure.CAN_Mode = CAN_Mode_Normal;
CAN_InitStructure.CAN_SJW = CAN_SJW_1tq; CAN_InitStructure.CAN_BS1 = CAN_BS1_2tq; CAN_InitStructure.CAN_BS2 = CAN_BS2_3tq; CAN_InitStructure.CAN_Prescaler = 48; (for 125kbps speed) 2. In hardware added 120E resistance at both ends.2015-05-08 08:08 AM
Dear Clive,
Please tell me the settings in the following code for 500kbps.CAN_InitStructure.CAN_TTCM = DISABLE;
CAN_InitStructure.CAN_ABOM = DISABLE; CAN_InitStructure.CAN_AWUM = DISABLE; CAN_InitStructure.CAN_NART = DISABLE; CAN_InitStructure.CAN_RFLM = DISABLE; CAN_InitStructure.CAN_TXFP = DISABLE; CAN_InitStructure.CAN_Mode = CAN_Mode_Normal; CAN_InitStructure.CAN_SJW = CAN_SJW_1tq; CAN_InitStructure.CAN_BS1 = CAN_BS1_2tq; CAN_InitStructure.CAN_BS2 = CAN_BS2_3tq; CAN_InitStructure.CAN_Prescaler = 48; CAN_Init(CAN1, &CAN_InitStructure); /* CAN filter init */ CAN_FilterInitStructure.CAN_FilterNumber=0; CAN_FilterInitStructure.CAN_FilterMode=CAN_FilterMode_IdMask; CAN_FilterInitStructure.CAN_FilterScale=CAN_FilterScale_32bit; CAN_FilterInitStructure.CAN_FilterIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterIdLow=0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdHigh=0x0000; CAN_FilterInitStructure.CAN_FilterMaskIdLow=0x0000; CAN_FilterInitStructure.CAN_FilterFIFOAssignment=0; CAN_FilterInitStructure.CAN_FilterActivation=ENABLE; CAN_FilterInit(&CAN_FilterInitStructure);