Other Parts Discussed in Thread: C2000WARE
I am trying to do a CAN data transfer from one LaunchXL-F28379D card to another to prototype an application for a client, using the C2000ware API. I have been unsuccessful at properly decoding the received data. So I found two example projects in C2000ware, can_ex4_simple_transmit and can_ex5_simple_receive, which I could modify for use on the LaunchXL-F28379D, to verify that the LaunchXL boards will support that operation.
The changes I have made in my versions of the projects are:
1) Used CAN-B instead of CAN-A, because by default, the CAN port pins on the LaunchXL boards use GPIO pins assigned to CAN-B;
2) Changed the LED toggled to use GPIO31 to drive LED1 on the LaunchXL boards. I also toggle GPIO15, a pin readily available in the LaunchXL booster pin banks, so I can send an output signal to an oscilloscope.
3) Inserted a delay at the end of each transmit to be able to visually separate the packets sent on an oscilloscope. The delay could be shortened or extended to make the LED blinks humanly perceptible.
4) Used the optional for loop instead of while in the Tx project so I could easily halt Tx at a known Tx count, and then verify that # of packets received matches # of packets sent, and that data content received matches data content sent.
5) Added predefined symbols CPU1 for single CPU operation and _LAUNCHXL_F28379D to select C2000ware resources for that board.
When I run the two modified example programs in the CCS debugger (CCS v10.4, compiler v20.4, C2000ware 3.4.0), the packet count does match. But the Rx data always appears as only 0x00 data bytes. This appears to be similar to the problem I have encountered with my project in development. My expectation was that, if both CAN example programs work correctly, data received by the simple Rx program would match data sent by the Tx program.
I would like to attach a ZIP file containing both projects, so you can review them to see if I have introduced any errors. I don't see a way to send a ZIP file. Can you tell me how I can get a copy of those projects to you?
Failing that, can you create a pair of Rx and Tx projects with similar changes to those I made for use on LaunchXL-F28379D, that does successfully receive the transmitted data, so I can see how you do it?
It is possible that the simple Tx and simple Rx example projects were not designed as a compatible pair. If so, what modifications can I make so that the simple Rx program will properly decode data sent by the simple Tx program?