Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

driver can: mailbox group mask

$
0
0

I’m using  CAN driver in my project (S7G2 MCU and ssp 1.1.3). In oreder to receive only mailbox ID, I set up all mailbox groups mask at the value 0x1FFFFFFF.

 

The problem is that after these settings the system does not receive the mailbox ID only.

 

By examining the SSP synergy code within the hw_can.c file, in the HW_CAN_MailboxMaskSet procedure, I noticed that the ID Mask is set only if the value of mailbox group mask is less than 0x1FFFFFFF. If the value of the mailbox group mask is equal to 0x1FFFFFFF, ID Mask is not set( as shown below).

 

I suppose this might be the cause of the problem.

If possible, I would like to have some clarifications on it.

 

Thanks

 

 

mask = p_mailbox_mask[i];

if (mask < 0x1fffffff)  //why not if (mask <= 0x1fffffff ?

            {

                if (CAN_ID_MODE_STANDARD == id_mode)

                {

                    CAN_REG(channel)->MKRn_b[i].SID = (mask & CAN_SID_MASK);    // Set standard ID mask.

                }

                else

                {

                    CAN_REG(channel)->MKRn[i] = (mask & (~CAN_XID_MASK));       // Set extended ID mask.

                }

 

                invalid_mask &= group_mask;

            }


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>