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.

TMS320F28384D: Swithing program to CPU1 to CPU2

Part Number: TMS320F28384D

Hello Team,

I am using the above Controller. and tying to run the can_ex5_transmit_receive.c example. it is working in CPU 1 .I need to run this on CPU2. Please suggest the steps to done  (I am new to TI controller programming, sorry for the basic question)

Thanks in advance!

  • Here i have added the code I am used

  • Hi Rahul,

    The basic flow for passing the control of a peripheral to a shared CPU is as follows:

              - Initialize device (set SYSCLK) in CPU1

              - Define GPIO settings for the peripheral (for CAN, the pin will be CANRX and CANTX) in CPU1

              - Unique to F2838xD family which has a third ARM core (CM) that can also share the CAN peripheral, set corresponding PALLOCATE bits to map the peripheral to either CM or any of the two CPUs.  This is accomplished by function SysCtl_allocateSharedPeripheral() in CPU1

              - Set the CAN peripheral for CPU2 control.  This can be done trhough function SysCtl_selectCPUForPeripheral().  Run this function in CPU2.  After this is set, CPU2 can now control the settings and message traffic of the CAN peripheral.

              - In CPU2 code, run the CAN initialization, CAN object definition, CAN interrupt setup and CAN transmit/receive routines

    Regards,

    Joseph