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.

TMS320F280049C: Clock setting when use an external CANFD controller MCP2518FD as a clock source

Part Number: TMS320F280049C


Hi

I‘m using an external CANFD controller for F280049C, I want to use a 20MHz crystal to clock the CAN controller, the CAN controller can output a clock of 20MHz to the MCU X1 pin as an external clock source.

But first I have to use the internal 10MHz of MCU to generate the SPI's clock, and than set the CAN controller's output clock.

Is it Ok that I change the clock's source from internal to external source when MCU normal working?

During the changing time ,will the clock lost effect the CAN FD controller?

Regards

A.W

  • A.W.

    Switching clocks is supported on this device, I would look inside the SysCtrl.c file for the functions we provide for doing so, as there is some order of operations to be mindful of to avoid tripping the missing clock detect logic, or accidentally activating the watchdog timer, etc.

    For the CAN FD controller, I'm not certain how this would impact things downstream.  There will be a brief period of time needed to switch over to the new clock source, then re-lock the PLL on the C2000 device.  No data would be sent out, but there would be some time that if data was sent from the CAN controller to the C2000 that it couldn't respond until it is done with the clock config.  The switch over delay would be small, on the order of a few OSCCLK cycles, but the PLL lock time is defined as:

    25.5 μs + 1024 * tc(OSCCLK) .

    Perhaps there is a keep out window for comms that could be defined while this is going on?

    Best,
    Matthew

  • Got it.

    Thanks, Matthew

    A.W.