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.

CCS/TMS320F28054F: Using eCAN with PCAN view

Part Number: TMS320F28054F
Other Parts Discussed in Thread: C2000WARE

Tool/software: Code Composer Studio

I am able to run the c2000ware example project "Example_2805xECanBack2Back" successfully (PassCount increases, ErrorCount remains at zero). Now we want to leave self test mode (set CANMC>STM = 0) and transmit/receive signals to/from the PCAN-USB CAN bus connected to the microcontroller. When we try to do this, the program gets stuck at "while(ECanaRegs.CANTA.all != 0x0000FFFF )" (the transmit acknowledge bits are not set). We are using the PCAN-View software to read/generate signals on a computer, and from there we cannot see any signals coming in. When we try to output a signal from the computer, we get an error suggesting that there is some interference or overlap with the data in the CAN bus (or the bus is simply not connected to the microcontroller).

What do we need to do to leave self test mode and communicate with the CAN bus? We think that our bit timing settings are correct, but can't be sure. Both the computer and the microcontroller should be operating at 1 Mb/s. How else can we test that the eCAN module is properly outputting signals to the CAN bus?

Bit timing settings:

    ECanaShadow.CANBTC.bit.BRPREG = 2;
    ECanaShadow.CANBTC.bit.TSEG2REG = 1;
    ECanaShadow.CANBTC.bit.TSEG1REG = 6;

    ECanaShadow.CANBTC.bit.SAM = 0;
    ECanaRegs.CANBTC.all = ECanaShadow.CANBTC.all;

Thank you

  • Hi Braden, 

    A detailed study of this document will help you:  https://www.ti.com/lit/an/spra876b/spra876b.pdf?ts=1594848623213   

    Cheers!

    Krishna

  • Thanks, I tried adapting the project for my MCU (28054f) and am running into problems. When I use the linker command file, "28054f_RAM_lnk.cmd", I get a warning "creating output section "ramfuncs" without a SECTIONS specification". I switch to the file "F28054f.cmd" and the warning is gone.

    In both cases, however, when I try to load the program onto the board, it does not reach the beginning of main. It builds and I see:

    C28xx: GEL Output:
    Zone 1 is Secure.
    C28xx: GEL Output:
    Zone 1 is Secure.

    But the program does not run. I have the ability to terminate the program, but not pause it. It never reaches the breakpoint at the beginning of main. I have no other errors. How do I configure the linker command file to get this to work?

  • I got rid of the warning by switching 

    .sect "ramfuncs"

    in F2805x_usDelay.asm to

    .sect ".TI.ramfunc"

    No warning now, but I still have the same issue. The program does not run and there are no apparent errors.

  • Here's my file search path, does INSTALLROOT_2833x need to be changed? I can't find a valid replacement.

  • Hi Braden, 

    Please share the linker command files you are having problems with.  Also please explain the memory allocations and the topology that you are trying to achieve for your application.  Looks like you are loading the application into RAM.  After you build are you able to load the application?  Are you able to see the application in RAM where you intend it to be?

    Thanks,

    Krishna