RT1062 CAN clock shared by controllers?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT1062 CAN clock shared by controllers?

Jump to solution
667 Views
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?
Labels (1)
0 Kudos
1 Solution
656 Views
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.
-------------------------------------------------------------------------------

View solution in original post

1 Reply
657 Views
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.
-------------------------------------------------------------------------------