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.

TMS320F280039C: How to optimization the execution time about MCAN_readMsgRam function?

Part Number: TMS320F280039C
Other Parts Discussed in Thread: C2000WARE

Hi Experts,

I am asking for my customer here. How to optimization the execution time about MCAN_readMsgRam function?

When we tested by clock count, test this function API around 531 clock.//2us. It so long time to read data from RXBuffer. As you know, DMA can support DCAN, but can not support MCAN.

So How to optimization the execution time about MCAN_readMsgRam function?

We find that below about MCAN_readMsg() in MCAN.c files, could we use if not while to transfer data from buffer?

1.Please guide us how to optimization the execution time about MCAN_readMsgRam? Or any better solution?

2.Please provide us MCAN bit-field example Send and receive?

The same issue below e2e link:

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1252212/tms320f280039-mcan_readmsgram-function-running-too-long?tisearch=e2e-sitesearch&keymatch=MCAN_readMsgRam#

  • Shaoxing, 

    This observation has come up before. We found out that the driver implementation of MCAN_getDataSize involved initializing the data size array for each function call. This was later defined as a global variable array, which significantly reduced the time taken for the MCAN_readMsgRam function. 

    This fix has already been pushed to later versions of C2000ware. Which version of C2000ware are you using?

    Thanks. 

  • Hi Experts,

    I am using the C2000Ware_5_01_00_00.

  • Okay, the fix I mentioned is already part of the C2000ware version that you are using. 

    I will need some time to look into the issue in depth. I will get back to you on this by Wednesday, Feb 28th. 

    Thanks.