Hi,
I am trying to configure the CAN Module of my XMC4200.
I followed the MutliCAN application note. In my main function I send a message every 100ms.
My ECU is connected to a PCAN Usb dongle.
Now the problem:
I can only receive error frames. (stoff error, other errors).
The bit timing must be the problem.
This is what my bit timing config looks like:
In the CAN Init function I call the XMC function: XMC_CAN_NODE_NominalBitTimeConfigure(CAN_NODE1, &CanBaud_cfg);
Per brute force in noticed that with the following bit timing config, I can receive messages, but there are still many errors:
XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t CanBaud_cfg=
{
.can_frequency = 65000000, // fCAN=120MHz
.baudrate = (1000 * 500), // baudrate=1000K
.sample_point = (10000), // Sample point=87,5%
.sjw = 1 // SJW=1+1
};
The strange thing is that my Global CAN Node is initialized to 80Mhz. How is this possible? I need a bit timing where I have no error frames.
I am trying to configure the CAN Module of my XMC4200.
I followed the MutliCAN application note. In my main function I send a message every 100ms.
My ECU is connected to a PCAN Usb dongle.
Now the problem:
I can only receive error frames. (stoff error, other errors).
The bit timing must be the problem.
This is what my bit timing config looks like:
Code:
XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t CanBaud_cfg=
{
.can_frequency = CAN_FREQUENCY_80, // fCAN=80MHz
.baudrate = (1000 * 500), // baudrate=500K
.sample_point = (8000), // Sample point=80%
.sjw = 2 // SJW=1+1
};
Per brute force in noticed that with the following bit timing config, I can receive messages, but there are still many errors:
XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t CanBaud_cfg=
{
.can_frequency = 65000000, // fCAN=120MHz
.baudrate = (1000 * 500), // baudrate=1000K
.sample_point = (10000), // Sample point=87,5%
.sjw = 1 // SJW=1+1
};
The strange thing is that my Global CAN Node is initialized to 80Mhz. How is this possible? I need a bit timing where I have no error frames.