Tool/software: Code Composer Studio
Hello,
I want to transfer the CAN communication from CPU1 to CPU2. I had found following two introductions in the forum and implemented to my project:
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/787160
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/539650?How-to-enable-cpu02-to-send-receive-over-CAN-bus-A-TMS320F28377D-
Code CPU1:
DevCfgRegs.CPUSEL8.bit.CAN_A = 1; // Connected to CPU2
#if CANA_RX_GPIO == 30 // set pins
sdiGpioPinMuxSetup(CANA_RX_GPIO, GPIO_MUX_CPU2, 1); //CANRXA
#endif
sdiGpioPinOptionsSetup(CANA_RX_GPIO, GPIO_INPUT, GPIO_ASYNC);
#if (CANA_TX_GPIO == 31)
sdiGpioPinMuxSetup(CANA_TX_GPIO, GPIO_MUX_CPU2, 1); //CANTXA
#endif
sdiGpioPinOptionsSetup(CANA_TX_GPIO, GPIO_OUTPUT, GPIO_PUSHPULL);
CANInit(0x00048000);
Code CPU 2:
CpuSysRegs.PCLKCR10.bit.CAN_A = 1; // turning on the peripheral clock
CANClkSourceSelect(CANA_BASE, CANA_CLK_SOURCE);
CANBitRateSet(CANA_BASE, CANA_CLK_FREQ, CANA_BITRATE);
If only CPU1 is used, CAN is already initialize if the expression window is used and set: CpuSysRegs.PCLKCR10.bit.CAN_A = 1;
Same procedure, after DevCfgRegs.CPUSEL8.bit.CAN_A = 1; from CPU1 the CAN communication in CPU2 does not work! Are there additional settings, which are not mentioned in the forum?
Thanks in advance!
Matthias