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.

TMS320F28075: F28075 CAN interrupt execution time too long

Part Number: TMS320F28075
Other Parts Discussed in Thread: C2000WARE

Hi Champ,

customer found the F28075 " can_loopback_interrupts_cpu01" example CANIntHandler execution time too long at around 5us(   CANMessageGet(CANA_BASE, 2, &sRXCANMessage, true);execution  time is too long ).

Anymethod to optimize the execution time?

  • 1. Optimize the C-code. There are various C optimizations that you can use to create your
    application. If these are suitable, then you do not need to proceed further.
    2. Use pragmas and intrinsics. The compiler has a built-in support that allows you to stay
    closer to the assembly code environment. If you can use these and they allow you to stay
    within your size/speed constraints, then you do not need to proceed further. You can consider
    your application complete at this point.
    3. Use assembly language. There are times when optimization and use of pragmas and intrinsics
    do not allow you to meet size/speed constraints. At this point, you may need to create a C-callable
    assembly language function. (from spra806)

    Hopefully, that helps.
    Also, what speed are you running the processor?
    On some of the C2000 family, things run faster when the routine is run from RAM (not sure if that
    is the case with F28075, but it is worth exploring)
  • In addition to the good suggestions from Todd, if possible, can look at the new CAN driverlib in C2000Ware. This offers a simpler read message function and is the preferred driverlib to use.

    ~\C2000Ware_1_00_02_00\driverlib\f2807x

    Best regards
    Chris
  • Hi Todd,

    Thanks a lot for your suggestion,customer used 120MHz CPU frequency.

  • Hi Chris,

    Thanks a lot will try to test driverlib performance.
  • Hi Todd,
    For intrinsics i understand it.
    For pragmas , do you means allocate the code to run from RAM?