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.

How to use CAN in TI RTOS?

Iam using the TM4C1294XL launch pad with TI RTOS. I could not find CAN drivers in the Tivaware folder under the TI RTOS. How can I use CAN in TI RTOS? Is there any boundations on System clock frequency for using CAN on the TM4C1294XL launchpad?

  • Hello Sandeep,

    There may not be any CAN drivers directly. But you can use TivaWare API's that are also in the TI RTOS to make one. There is no limitation on the system clock frequency except that it must be from PLL+Main Oscillator to have baud rate very precise and stable.

    Regards
    Amit
  • Hi Amit,

    Thanks for your reply. If I try to use the Inbuilt API's in the Tivaware for CAN, iam getting a warning while using the "CANIntRegister" API. The warning is "creating output section ".vtable" without a SECTIONS specification". Because of this Iam also not able to debug the code. Can you please tell me how should I handle the CAN interrupts in TI RTOS.
  • sandeep choudhary said:
    If I try to use the Inbuilt API's in the Tivaware for CAN, iam getting a warning while using the "CANIntRegister" API. The warning is "creating output section ".vtable" without a SECTIONS specification".

    The .vtable section is used to contain the interrupt vector table in RAM. Looking at examples shows the .vtable being placed at the start of RAM. In the linker command file (.cmd) file for the project add the following to the SECTIONS, which tells the linker to place the .vtable section at the start of RAM:

        .vtable :   > 0x20000000
    

    sandeep choudhary said:
    Because of this Iam also not able to debug the code.

    If the linker gives the warning "creating output section ".vtable" without a SECTIONS specification" it means the linker has chosen an arbitrary memory region to place the .vtable section in, which will probably lead to a failure to flash the program, or the program fails at run time when it attempts to write to the .vtable section.