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.
Part Number: TCAN4550
I've successfully enabled the TCAN device to implement a simple echo program where when I send a CAN frame over the bus, the TCAN will receive it, copy it, change the frame ID and then send the copied frame back onto the bus. This works well.
What hasn't worked yet is that I never see any indication that a TX event is being placed in the TX Event FIFO after the copied frame is echoed back onto the bus. In my interrupt handler, I never seen any of the TX Event flags set (TEFL, TEFF, TEFW, TEFN, TFE) and when I read the TX Event FIFO status register it always reads a value of 0.I consistently see the TC interrupt flag in my interrupt handler, which I assume is indicating the successful transmission of the echoed CAN frame, I just don't understand why I'm not getting any TX Events in the FIFO.
All interrupt processing happens in the context of a task: when nINT signals an interrupt the MCU's interrupt handler sets a flag that signals a task to unblock. When the task is running, it performs all SPI interactions and processes the TCAN interrupt flags.
The TCAN is configured with:5 SID Filters5 RX Buffers5 TX Buffer elements configured as a "queue"RX FIFO 0 contains 17 elementsTX Event FIFO contains 5 elements
On start up, I enable the following interrupts:TEFNE, RF0NE, DRXE
I've also tried enabling TCE, but that has had no affect on receiving any TX EventsI've also tried enabling interrupts for each individual TX Buffer, but still with no success in getting TX Events
Is there a configuration step that I am missing that I need to enable the TX Event FIFO? Any ideas as to why I never see any created and never get an interrupt indicating that a new TX Event is ready?Thanks!
In each TX buffer element, there is an "EFC" bit in the header (in word 1 immediately after the message marker) that needs to be set to one in order for that buffer's transmission to be logged in the event FIFO. Is this bit being set in your application? For reference, you might want to look at the TX buffer element fields defined in Table 15 of our Software User's Guide:
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
In reply to Max Robertson:
Thanks for the suggestions, that's what I was missing!
Quick follow up question. In the Bosch user manual it states that when reading from the TX Event FIFO, after the get index is read, the associated start address should be calculated by multiplying the get index by 2 and then adding that to the TX Event FIFO start address.Can you confirm that multiplying by 2 is correct? Since the TX Event element size is 8 bytes, I would have expected to multiply the get index by 8, similar to how the RX FIFO get index is multiplied by the rx element size in bytes. I assume this means that the TX Event FIFO get index indexes per word instead of per byte like the RX FIFO, is that correct?
In reply to Dustin Lane:
I believe you are correct that you need to multiply the get index by 8 similar to the RX FIFO. Everything with the TCAN4550 is word based with a byte address and as such you need to calculate that byte address. I'm not familiar with the particular section or wording in the MCAN manual you were referencing, but I also spoke with our firmware expert on this device who believes that you need to treat it the same as the RX FIFO, however he hasn't really used that much. If you find that this isn't correct, we will take a much closer look for you.
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. 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.