Quantcast
Channel: Infineon Forums
Viewing all articles
Browse latest Browse all 9892

XMC 4200 CAN Bit Timing

$
0
0
Ok I think we figured out the problem:

The communication works without errors when we use the following config:

XMC_CAN_NODE_NOMINAL_BIT_TIME_CONFIG_t CanBaud_cfg =
{
.can_frequency = CAN_FREQUENCY_80, // fCAN=80MHz
.baudrate = (1000 * 370), // baudrate=500K
.sample_point = (8000), // Sample point=87,5%
.sjw = 1 // SJW=1+1
};

The baud rate is set to 370k, but the actual baud rate is 500k.

There must be a problem with the peripheral clock, because we have the same problem wit the UART connection:
There we want to send with 250k, but we must initialize the baudrate to 189k

Do we have to call some addintional Clock API functions? In our code we do not initialize clocks. I thought clock initializitation is done in the SystemSetup function, before the main Function.

What should we do to have the correct clock settings?


Edit:
OK solved the problem. Our externel clock source was 16Mhz. The standart configuration is always 12Mhz.
I wrote an own SystemCoreClockSetup function, where I call the XMC_SCU_Init function. The comunication works now with the correct baudrate.

Viewing all articles
Browse latest Browse all 9892

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>