Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
Hi,
Using the 28379D, I haven't found this information in the technical documentation ; what is CAN_CLK? Is it System Clock below (200MHz in my case)?
Thank you.
Regards,
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE
Hi,
Using the 28379D, I haven't found this information in the technical documentation ; what is CAN_CLK? Is it System Clock below (200MHz in my case)?
Thank you.
Regards,
Hi Florian,
CAN_CLK is the prescaled (divided) clock from SYSCLK. The divider/prescaler is set in the CAN bit timing rate register CAN_BTR. This is a combination of BRP (CAN_BTR[5:0] value of 1 to 64) and bit rate prescaler extension BRPE (CAN_BTR[19:16] value of 1 to16).
For example, if application requires a 10MHz CAN_CLK for the highest baud rate of 1MHZ, prescaler should be set to 20. BRP needs to be set to 19 (20 is BRP + 1) and BRPE will be left at 0.
Another example: If application requires a 1MHz CAN_CLK for low baud rate of 100KHz, prescaler should be set to 200. Since BRP max value is 63, the extension prescaler has to be used. Setting BRP to 19 and BRPE to 9 would provide a (19 + 1)*(9 + 1) = 200 prescaler.
Bit timing calculations for CAN can be cumbersome at times. I'd recommend using function CAN_seBitRate() in C2000Ware as it figures out all the settings for CAN_BTR fields given SYSCLK setting and desired CAN baudrate. There are also several CAN examples you can refer to that illustrate the use of CAN_setBitRate().
Hope this helps...
Regards,
Joseph