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.

TMS320F28069: CAN communication doesn´t work with example CAN_TXLOOP_A. The program never exit from the loop "Wait for TA25 bit to be set..".

Part Number: TMS320F28069
Other Parts Discussed in Thread: TMS320F28335, , C2000WARE

Tool/software:

Hi, I have tried the example CAN_TXLOOP_A from Application Report Programming Examples for the TMS320x28xx eCAN in a TMS320F28335, the chip proposed for the examples, and it has worked properly. In my CAN network I have other node, a CAN analyzer, that detects all the messages transmitted. Until now it's all right, but I wan't to use CAN in other board with a TMS320F28069. I tried the same example TXLOOP_A in that board, but changing, as i read, 1° the CANBTC parameters with the Calculator for CAN Bit Timing Parameters (so for this chip with a 90MHz Clock, i enter 45MHz CAN clock freq, 1000kbits/s and 1m Bus lenght) and 2° the CLK from CPU parameters.

1° In the file C:\ti\C2000Ware_5_03_00_00\device_support\f2833x\common\source\DSP2833x_ECan.c, I changed the function InitECana(), that has the CANBTC registers and writed the result from the Calculator:

    ECanaShadow.CANBTC.all = 0x0402A2;
    ECanaRegs.CANBTC.all = ECanaShadow.CANBTC.all;

2° In the file C:\ti\C2000Ware_5_03_00_00\device_support\f2833x\common\include\DSP2833x_Examples.h, I changed the parameters to the ones I found for f2806x boards in the file F2806x_Examples.h:

#define DSP28_PLLCR   18  // For the F28335 is 10
#define CPU_RATE    11.111L    // for a 90MHz CPU clock speed (SYSCLKOUT)

After this changes, I change the Target Device to TMS320F28069 and run TXLOOP_A project, but it get stucked in the loop waiting the acknowledge bit to be set:

        do {ECanaShadow.CANTA.all = ECanaRegs.CANTA.all;}   // Wait for TA25 bit to be set..
        while(ECanaShadow.CANTA.bit.TA25 == 0 );

Should I change any more code? I didn't changed anything in the physical network. So I can't get the board to communicate. I dont receive nothing on the CAN analyser. I'm checking too in the oscilloscope CAN_H bus signal and TX pin from F28069, without results. There isn't any data signal in the oscilloscope, just CAN_H at 1.5V and TX pin at 3.3V aprox.

Other aprecciations: the CAN transceiver works properly. I tried also a CAN example for F2806x chips: " Example_2806xECanBack2Back.c". This example uses the Self-Test Mode, so communication is intern. The program worked correctly in the F28069, but I set off the Self-Test Mode to see if I can read any signal in oscilloscope or CAN-analyzer, without results too.