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.

CCS/TMS320F28069: I am working with TMS320F28069, I need to Initialize CANopen how ro define the LAM (Local-Acceptance Masks (CANLAM))

Part Number: TMS320F28069
Other Parts Discussed in Thread: TMS320F28335

Tool/software: Code Composer Studio

Hello Everyone

I have 2 Devices, both are Slaves(So I send 0x80 Heartbeat signal from a display)

both Devices sends candata: Device1: 0x181 , 0x281, 0x381, 0x481...Device2: 0x182 , 0x281, 0x382 0x482

I have 16 mailboxes as RX

this is the example code for masking

/* Define Local Acceptance Masks for rx mailboxes */
for(i=0;i<CAN_RX_MAILBOXES;i++)
{
p_lam_reg = &ECanaLAMRegs.LAM0 + i; /* pointer to every Local Acceptance Mask */

(*p_lam_reg).bit.LAMI = 0; /* only standard identifiers (as MBOX own identifier) */ /// LAMI = 1; when both standard and 11- bit extended
(*p_lam_reg).bit.LAM_L = 0x0000;
if(i > 12) /* mailboxes 13-15 */
(*p_lam_reg).bit.LAM_H = 0x0604; /* bits 0, 7 and 8 from 11-bit identifier are ignored */
/* valid for ID = 0x000 (NMT), 0x080 (sync) and 0x100 (time stamp) and 0x81 state change*/
else if (i > 9) /* mailboxes 10-12 */
(*p_lam_reg).bit.LAM_H = 0x0600; /* TPDO1 from node 99 */
else if (i < 6) /* mailboxes 0-5 */
(*p_lam_reg).bit.LAM_H = 0x1E04; /* only messages for this nodeID (bit 0 ignored) */
else /* mailboxes 6-9 */
(*p_lam_reg).bit.LAM_H = 0x0C00; /* only PDO1&2 messages for this nodeID */
}

I have not understood

why /* mailboxes 0-5 */

*p_lam_reg).bit.LAM_H = 0x1E04;... 0x1E04; what is this value from 0-5 mailboxes meaning

mailboxes 6-9 */
(*p_lam_reg).bit.LAM_H = 0x0C00;... 0x0C00; what is this value from 6-9 mailboxes meaning

mailboxes 10-12 */
(*p_lam_reg).bit.LAM_H = 0x0600;....0x0600 what is this value from 10-12 mailboxes meaning

mailboxes 13-15 */
(*p_lam_reg).bit.LAM_H = 0x0604;....0x0604what is this value from 13-15 mailboxes meaning

This Masking is working as to send the CANbus data to Display 

but now i want to make new masking to communicate between 2 Devices, I mean when Device1 sends candata should receive in devices 2 usinf canbus frames PDOS

like I can read 0x181 from device1 into device2 and from device2 0x182 into device1, so i wantt o make new masking but i want to understand how to read

  • Janybasha, 

    Please download my Application report http://www.ti.com/lit/spra876. Specifically, there ias an example that clearly illustrates how acceptance mask filtering works. I also urge you to look at the Debug tips provided. Note that the app.note examples were written for the TMS320F28335 device. However, they can be easily adopted for any 28x device with eCAN, provided you take care of the change in SYSCLKOUT speed and the resultant changes warranted for the CANBTR register.

    While we will be happy to help you with the CAN implementation on our device, we regret we won't be able to support you regarding questions you have on CANopen. For that you may have to reach out to CANopen forums online.