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.

Concerto IPC -CAN protocols conflict

Dear support,

We have a program on Concerto F28m35H52C1 (CCS 5.2.1, SYS/BIOS 6.33.5.46, xdtools 3.23.4.60) 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.

Thanks,Sabina

 

 

  • Sabina,

    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?

    Judah

  • Hi Judah,

    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)

    Thanks,Sabina

  • Sabina,

    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.

    Regards,

    Trey

  • Hi Trey,

    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?

    Thanks, Sabina

     

  • Sabina,

    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.

    Regards,

    Trey

  • Hi Trey,

    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.

    Thanks,Sabina

  • Sabina,

    You understand the differences just fine.  Concerto has a different CAN controller than the Piccolo devices.

    1. No reason, this is just an implementation differences between the two CAN controllers
    2. The message number refers to the mail box number.  You are correct, the message ID does not impact priority.
    3. Once again, this is just because of the two different CAN controller implementations.

    Trey

  • Hi Trey,

    Thanks for rapid and clear answer.

    Sabina