We have a program on Concerto F28m35H52C1 (CCS 5.2.1, SYS/BIOS 126.96.36.199, xdtools 188.8.131.52) with CAN protocol working. After adding to the configuration file IPC support:var IpcMgr = xdc.useModule('ti.sdo.ipc.family.f28m35x.IpcMgr');IpcMgr.readAddr = 0x20016000;IpcMgr.writeAddr = 0x20014000;IpcMgr.sharedMemoryOwnerMask = 128;IpcMgr.messageQSize = 256;:CAN stop working - we get ReceiveError in CAN bus. We didn't find any operlap memory problem.
It is known about any conflict between CAN and IPC? TCP/IP and USB protocols works with IPC support properly.
I do not know much about CAN, but I do know about IPC. I don't really see how IPC would interfere with CAN.
Are there different threads in your system for handling CAN and IPC?
Without more information its hard to say what's going on in your application.
What would cause a ReceiveError? Is the System too busy that it is not able to process things in time?
If my reply answers your question please mark the thread as answered
The problem dissapeared after changing Boot.M3SSDIVSEL = Boot.M3Div_1; (in the problematic version Boot.M3SSDIVSEL = Boot.M3Div_2);
if we set configuration to M3 -75mhz, DSP-150Mhz , SysCtlClockGet(SYSTEM_CLOCK_SPEED) return 37500000 - that is problematic for the CAN,with Boot.M3SSDIVSEL = Boot.M3Div_1;(M3 -150mhz, DSP-150Mhz) SysCtlClockGet(SYSTEM_CLOCK_SPEED) return 75000000 - that work with CAN properly
we should work with M3 -75mhz, DSP-150Mhz, Can-1Mhz
What is the properly configuration should be done for our purpose? As we see CAN doesn't work properly for all frequencies.
Coul you please consult with Trey German and Mike (from http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/t/199774.aspx)
The reason CAN is failing is because the bit rate is configured incorrectly. It looks like there might be an error in the SysCtlClock get function which is causing it to return the wrong value. That function should always return the M3 clock speed, and it appears it is returning the speed divided by 2. I'll take a look at this function later today.
For now, I would set you CAN bit timing values manually without using the SysCtlClockGet API. Also, The M3 IS NOT designed to run at 150MHz. Running the M3 at 150MHz may have unpredictable results. If you are running the C28 at 150MHz, you must run the M3 at 75MHz.
For manually setting you use CANBitTimingSet() function. But how to know the values of tCANBitClkParms structure. I know only that CAN work in the 1Mhz speed. What values shoud be set for Concerto CAN ? Does exist any example with this function using?
Bit rate calculations are talked about in detail in section 25.12 of the Concerto Technical Reference manual (spruh22). Calculating the bit rate is a somewhat iterative process where you must first select the time quanta by setting the divider. Then you select the actual bit rate and sample point by setting the Tseg1 and Tseg2 values appropriately. Please read the guide and give it a try yourself.
Thanks for the answer. We have two projects : one on the Piccolo and another one on the Concerto. Piccolo and Concerto speak by CAN protocol.
The questions are the following:
1. Is there is a reason of the oppositive mailbox priority in Piccolo(mailbox 31 has the highest receive priority) and Concerto (Message object 1 has the highest priority, while message object 32 has the lowest priority)?
2.In Concerto technical doc #25.11.2 -"...The receive/transmit priority for the message objects is attached to the message number, not to the CAN identifier..." It is not clear what is 'message number' and what is 'CAN identifier'. Does it mean that messageID(CAN identifier??) doesn't influence on the priority during receive messages?
3. Is there is a reason of the oppositive Filter Mask: in Concerto Msk[28:0]:1 -The corresponding bit in the message identifier is used for acceptance filtering.in Piccolo LAM[28:0]: 0 -Received identifier bit value must match the corresponding identifier bit of the MSGID register.
May be I don't understand it propely... Could you please clarify it.
You understand the differences just fine. Concerto has a different CAN controller than the Piccolo devices.
Thanks for rapid and clear answer.
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.