CAN Communication Issue
Hi,
I am using STM32F446RE Nucleo and a Peak CAN Usb to test the CAN functionality of the microcontroller. I have connected the Microcontroller to a CAN Transceiver (TJA1050) and added a 120ohm resistor between the CANH and CANL line. I have attached the config of the CAN hardware below
hcan1.Instance = CAN1;
hcan1.Init.Prescaler = 42;
hcan1.Init.Mode = CAN_MODE_NORMAL;
hcan1.Init.SyncJumpWidth = CAN_SJW_1TQ;
hcan1.Init.TimeSeg1 = CAN_BS1_2TQ;
hcan1.Init.TimeSeg2 = CAN_BS2_1TQ;
hcan1.Init.TimeTriggeredMode = DISABLE;
hcan1.Init.AutoBusOff = DISABLE;
hcan1.Init.AutoWakeUp = DISABLE;
hcan1.Init.AutoRetransmission = DISABLE;
hcan1.Init.ReceiveFifoLocked = DISABLE;
hcan1.Init.TransmitFifoPriority = DISABLE;
When I transmit a message using the Peak CAN, I get "Frame stuff error (Rx)". I have already attempted to
- Change the baud rate
- Remove the resistor
- Tried a different Peak CAN
- Changed the Transceiver (3 times)
Is the issue from the Transceiver or the microcontroller? Is there any way to check the functionality of the transceiver?
Thanks in advance!
