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:
- 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?