RT1062 CAN clock shared by controllers?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

RT1062 CAN clock shared by controllers?

跳至解决方案
734 次查看
jim_verheijde
Contributor II

Hi all,

 

I working with the RT1062 chip. I am trying to use the CAN controllers for communication. I want to use both the CAN2 at 1Mbit/s and CAN_FD controller (CAN3) at 8Mbit/s. To do this I must use a CAN_CLK of 80Mhz so I choose the following values which selects the pll3 (480Mhz) and divides by 6 and then by 1 to get 480Mhz/6/1=80Mhz:

#define FLEXCAN_CLOCK_SOURCE_SELECT (2U)
#define FLEXCAN_CLOCK_SOURCE_DIVIDER (0U)

CLOCK_SetMux(kCLOCK_CanMux, FLEXCAN_CLOCK_SOURCE_SELECT);
CLOCK_SetDiv(kCLOCK_CanDiv, FLEXCAN_CLOCK_SOURCE_DIVIDER);​

 

For the CAN_FD controller this works fine, however, when using these clock settings with the CAN2 controller it doesn't work and I get the following errors when connecting via a CAN-USB connector.

jim_verheijde_0-1600268416074.png

However when using lower clock speeds by dividing by 4 for example to get 480Mhz/6/4=20Mhz:

#define FLEXCAN_CLOCK_SOURCE_SELECT (2U)
#define FLEXCAN_CLOCK_SOURCE_DIVIDER (3U)

CLOCK_SetMux(kCLOCK_CanMux, FLEXCAN_CLOCK_SOURCE_SELECT);
CLOCK_SetDiv(kCLOCK_CanDiv, FLEXCAN_CLOCK_SOURCE_DIVIDER);​

 CAN2 works again, however CAN_FD can only run at 2Mbit/s.

 

So my questions are:

  • Can I use different clocks for the different clock controllers, or are they always shared?
  • Or alternatively, how can I make the CAN2 controller work with a CAN_CLK of 80Mhz at 1Mbit/s?
标签 (1)
0 项奖励
1 解答
723 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1)Can I use different clocks for the different clock controllers, or are they always shared?
-- No, I'm afraid not, they've shared the same root clock.

jeremyzhou_0-1600322635046.png

 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

在原帖中查看解决方案

1 回复
724 次查看
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1)Can I use different clocks for the different clock controllers, or are they always shared?
-- No, I'm afraid not, they've shared the same root clock.

jeremyzhou_0-1600322635046.png

 

Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------