I'm trying to configure TMS320f28035 for eCAN communication.
I used the datasheet of the DSP to configure the communication, step by step as written at the end of the document.
with the watch window, I follow the evolution of the different registers to control the configuration.
Everything is ok, but in the step "Transmitting a message", the register TA.0 (transmit Acknowledge for mailbox0) never set to 1....
My registers are all good at this step, no transitting informations are visible on the pins of the DSP (GPIO30-31).
My Question is : could it be a bad Hardware configuration or is there a real problemn in the code ?
To use the communication, I used two cards with the same dsp :
CAN-TX and CAN-RX are connected to GPIO30 and GPIO31 of the DSP.
I really don't know how to solve this problem, because I have no idea about how I can understand why the CANTA register is not ok using software.
thanks for your help,
The TA bit is only set once the acknowledge bit of a CAN message has been received from another device on the bus. Given that we aren't able to see anything on the actual CAN bus lines, I suspect that your GPIO pins are not configured correctly. Please make sure you've setup the GPIO mux appropriately for CAN on GPIO30 and 31 and that any loopback modes for the CAN peripheral are disabled.
Thanks Trey for this answer,
My GPIO were configured correctly, but lines were in comments!...
That's the probleme when we are not the first to work on the code.
Also, now I see data on the bus, but I have no TA!
What do you mean with "loopback" ?
Well like I said, for the TA bit to be sent the transmitted message must be acknowledged by another device on the bus. When you are running this test are both F28035 devices running with their CAN peripherals setup to the same bit rate? You need at least one other device on the bus to acknowledge each message. The reason i mentioned the loopback mode is that there is a mode that can be enabled which effectively causes the CAN controller to ignore the ACK bit for test purposes. You do not want this mode turned on for what you are trying to accomplish.
Ok, thanks for your answer, correct me if I'm wrong, if I understand correctly your last message, it's the receiver who makes the ACK, and the transmitter who set RMP?
Actually, we are waiting for ACK at the level of transmitter.... and for the RMP at the level of the receiver.
I've configured my registers as seen in the datasheet and I've checked examples....
BUT : In all case, when I try to read the content of the mailbox in the receiver, it's always empty.
for the loopback mode, he is disable since the beginning.
I used two devices for this protocole, they are configured with the same baud rate.
You're half right. The receiving device drives an ACK on to the bus during the ACK bit in a CAN frame. This lets the transmitter know that the message was received successfully by someone on the bus. RMP is set by the CAN controller in the receiving device whenever a frame is received. The CPU must manually clear this bit.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.