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 enable cpu02 to send/receive over CAN bus A? (TMS320F28377D)

Other Parts Discussed in Thread: TMS320F28377D, CONTROLSUITE

Hi,

I am bringing up a new board that has the dual-core TMS320F28377D and having trouble getting cpu02 to send/receive over CAN bus A.

I have cpu01 sending/receiving to/from CANA with no issues. I tried assigning the CANA tx/rx GPIO pins to cpu02 but that alone is not enough to enable cpu02 to send/receive successfully.

I couldn't find an example in controlSuite's F278xD sample code that shows now to enable cpu02 to control CANA, all of the examples are for cpu01 only. So I am probably missing something.

Any ideas or suggestions?

Thanks,

Robert

  • Hi Robert,

    Please check if you have enable the CAN clock from CPU02. Once a peripheral is assigned to CPU02, clock path from CPU02 is used for that peripheral and it need to be enabled from CPU02 code via PCLKCRx register (in this case PCLKCR10 register).

    Regards,

    Vivek Singh
  • Hi Vivek,

    Thanks for the feedback. I added the following to CPU02:

    EALLOW;
    CpuSysRegs.PCLKCR10.bit.CAN_A = 1;
    EDIS;

    but CPU02 is still unable to send/receive on CAN bus A (using the same sample code that works for CPU01).

    Are there additional settings (other than GPIO pin config and clock enable) for assigning CANA to CPU02?

    Thanks again,

    Robert

  • Hi Robert,

    Following are the steps which needed (apart from normal device initialization) -

    CPU1 -

    • Setup the GPIO pinmuxing for CANA peripheral
    • Assign the CANA peripheral to CPU2

    CPU2 -

    • Enable the clock for CANA
    • Setup CANA

    Please make sure you are following these steps. If no issue in sharing the code, please share the CPU1/CPU2 code related to CANA.


    Regards,

    Vivek Singh

  • Hi Vivek,

    I need more details on how to implement CPU1 step 2  above (Assign CANA peripheral to CPU2). I am confident I have all of the other steps covered (for both CPU1 & CPU2).

    I am confident that CPU1 is handling the pinmuxing config correctly but not sure what else is required on that side. This is not holding me up right now but we really need to get CANA under CPU2 control soon.

    Thanks for your patience,

    Robert

  • Hi Robert,

    Please refer section "2.14.9.48 CPUSEL8 Register (Offset = E6h) [reset = 0h]" in device TRM.

    Regards,
    Vivek Singh
  • Hi Vivek,

    Success! Thanks for pointing me to the CPUSEL8 register. That did the trick.

    Thanks again,

    Robert