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.

LAUNCHXL-F280025C: CAN peripheral code works on TMS320F28075, does not work on TMS320F280025C

Part Number: LAUNCHXL-F280025C
Other Parts Discussed in Thread: TMS320F28075, C2000WARE, TMS320F280025C,

We have a custom design with an TMS320F28075 that has one of the two CAN buses fully operational on it. We ported the code from the design over to the LAUNCHXL-280025C, removed support for the extra CAN bus, but the CAN bus does not successfully transmit. The CAN bus immediately goes into the bus-off state. When attempting to receive messages no activity is seen in the code that handles getting the messages.

Loop back mode was then attempted to be turned on with no success either.

I then took one of the example designs from the C2000ware driverlib folder and could not manage to get that code to successfully transmit or receive messages on the LAUNCHXL-280025C.

At this point I took the same example design and tried to run it on the design with the TMS320F28075.  There I was able to transmit with the example code, but was not successful in getting that to receive CAN data.  Loopback mode with the example code was used, but that did not work.  I then tried to get our CAN design to run in loopback mode, but that failed as well.

Examining the register sets and functionality of the DCAN peripherals for the TMS320F28075 and TMS320F280025C, they seem to be the same with exception of a few missing bits in registers and only one CAN bus instead of two.  Can someone confirm this for me and attempt to explain why code that works on the TMS320F28075 does not work on the TMS320F280025C?

  • Hi Albert,

    Need more details on your setup and code from the F28075 application in order to understand what you are trying to accomplish:

      - F28075 has 2 DCAN modules.  From your description, i cannot tell if you used both CANA and CANB and connected each to a different CAN bus with each CAN module having its own transceiver.  Can you clarify this?

      - In your F28075 set up, what kind on CAN transactions are done on CANA and CANB?  Are they both transmitting and receiving?

    On the LAUNCHXL-F280025C, can you tell me which driverlib specific example(s) you were trying to run and did you by any chance examine the contents of CAN_ES register?

    Thanks,

    Joseph

  • -On the F28075 we only use a single CAN bus (CANA) and there is a single transceiver used to drive CAN HI/LOW.

    -As mentioned above, we're only using a single CAN bus (CANA).  On CANA, we're transmitting and receiving messages.

    -The specific example I'm using is the ti\c2000\C2000Ware_4_01_00_00\device_support\f2807x\examples\cpu1\can_loopback_bitfields\cpu01\can_loopback_bitfields.c.  I understand this is not for the F280025C, but it was the only CAN example with loopback enabled that was complete with regard to function definitions.

    -I did examine the contents of the CAN_ES register and it showed that bits 5-7 were set indicating BOff, EWarn, and EPass.  This occurs when I attempt to transmit data over the CAN bus.

  • You mentioned that you also tried the examples on LAUNCHXL-F280025C using C2000Ware driverlib, which example(s) have you tried and what was the value of CAN_ES (including LEC)?  

    Let's first see what the problem might be with LAUNCHXL-F280025C with C2000Ware driverlib examples.  I don't want to discount the results you got running the bitfield loopback example for F28075 on LAUNCHXL-F280025C but a lot of edits must happen correctly in order for that test to run properly (like clock setup, header file locations, etc...), and there might be a chance that incorrect files/headers were used.

  • I created a new project using exclusively the driverlib and device_support files from the f28002x directories.  I made modifications for the references to .TI.ramfunc to use ramfuncs, but other than that the files are stock.  I was able to successfully use external loopback with the example file can_ex2_loopback_interrupts.c.  

    Using can_ex5_transmit_receive.c I was able to transmit and receive over CANA successfully.  It appears there is a difference between how the DCAN module in the F28075 functions versus the F280025C.  I'm all set at this point with this issue.  Thanks for pushing me in the right direction.

  • Looks like you are in the right directions.  Let us know if you run into other issues.

    Regards,

    Joseph