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.

ECanaRegs structure values are always zero

Other Parts Discussed in Thread: TMS320F28069

Hi to everyone :)

I'm working in project that is based in Auto-REM (that is based in the TMDSPLCKIT-V3 C2000 Power Line Modem Developer's Kit) and I'm trying to configure the eCAN controller.

If that matters, I'm using the "test_tx_rx" example. In that example I successfully configured and initiated the SCIA port and now I want to do the same with the eCAN.

To configure the eCAN gpios and controller I'm using the InitECanGpio and InitECan functions that are present in the F2806x_ECan.c and F2806x_ECan.h files.

So, when I call the InitCan function, I get stuck in the first "do while" loop. In the debug mode I see that all the data in the ECanaRegs structure is always zero and by that I can get out of the "do while" loop

********************************

// Wait until the CPU has been granted permission to change the configuration registers
do
{
ECanaShadow.CANES.all = ECanaRegs.CANES.all;
}
while(ECanaShadow.CANES.bit.CCE != 1 ); // Wait for CCE bit to be set..

******************************

I successfully tried to run the "ecan_a_to_b_xmit" and I saw that the values in the values in the ECanaRegs are all updating.

The main difference from the "ecan_a_to_b_xmit" example to the "test_tx_rx" plc example is that the first one runs directly from the DSP RAM and the second one is loaded from the DSP flash.

I suppose that im my case the flash to ram loading is well done because it was done by Texas Instruments. Still, I can't understand is the "SciaRegs" structure is well addressed and the "ECanaRegs" is not well addressed.

Anyone have any idea about what is wrong here?

Thanks in advance for any kind of help you may have.

DSP:TMS320F28069

CCS: Version: 5.2.1.00018 Linux

Project Type: DSP/BIOS Flash

  • Hi there :)

    I already found the solution.

    For those who are familiar with TMDSPLCKIT-V3 C2000 Power Line Modem Developer's Kit, you will see that the F2806x_SysCtrl.c file present in the examples is not used, they use the csl_f2806x.lib instead.

    So, all I had to do was enable the eCAN clock and finish the eCAN configuration.


    The moderator can mark this thread as solved :)


    Thanks to everyone who read what I wrote :)