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.
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:
Solved! Go to Solution.
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.
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.
-------------------------------------------------------------------------------
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.
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.
-------------------------------------------------------------------------------