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.

eCAN basic setup problem

Other Parts Discussed in Thread: TMS320F2812

Hello,

I have a MSc project in mobile robotics which involves the use of TMS320F2812 DSP and CAN. I would like to setup a test configuration. I compiled example programs from TI but unfortunately there is no signal change on the CAN TX pin. During debugging I noticed, that the program never actually leaves the InitECan function because it gets trapped in a loop waiting for the CCE bit to be set - and this does not happen. Forcing a change with Code Composer lets the program through, but there is no sign of CAN frames. I would be very happy if anyone could help.

Regards,

stan 

  • Hi Stan,

    have You connetced a transceiver to the CAN-Pins of the CPU and have You wired the CAN-Bus correctly ? Incorrect connection of thee Transceiver as well as a shortcut on the CAn-bus can cause this error.

    The CPU has to sense CYNRX high prior able to set the CCE to one. For our systems we had to implement a break inside this loop, because sometimes the system does have a corrupted CAN-bus.

    /* Enter setup mode */
    ECanaRegs
    .CANMC.bit.CCR = 1 ;
    CCR_timeoutCounter
    = 0;
    while(ECanaRegs.CANES.bit.CCE != 1 ) // Wait for CCE bit to be set...
    {
      if (CCR_timeoutCounter++ > MAX_CCR_TIMEOUT_COUNTER)
      {
        ECanaRegs
    .CANMC.bit.CCR = 0;
        status
    = CAN_ERROR;
        return status;
      }
    }

    Regards,

    JayBe

  •  Sta...i'm gaston and i new in the dsp family, i have a ezdsk 28335 and my problem is i can't run a program because i don't know how to make a .cmd, i just want to do a sine wave, i know how to do the c code but de .cmd not. can you help me. Thanks. Gaston.

  • Hello Remember to activate the CAN clock in DSP281x_SysCtrl.c.  SysCtrlRegs.PCLKCR.bit.ECANENCLK=1;