Other Parts Discussed in Thread: HALCOGEN, TMS570LC4357
Hi
I'm struggling to understand how to make use of the HW masks for filtering out CAN messages when using the controller with an Rx FIFO.
Note I'm using the Autosar MCAL in my project but I'm not so sure how this would work with HALCOGEN either.
Here is my current setup On DCAN0:
- 1 RX mailbox declared in the MCAL as basic with a fifo of 8 messages
- 56 TX maiboxes configures as full
All IDs of the CAN messages circulating on the bus the ECU is connecto are standards (11bits long).
When ORing the ID values the ECU has to receive, it equates to 0x7F7
The setup of the mailbox is the following:
Can_MailboxType CanConfigSet_0_CanHardwareObject_0 =
{
1U, /* CanHandleType 0=Full, 1=Basic */
0U, /* CanIdType 0=standard 1=Extended 2=Mixed*/
0x7FF, //832U, /* ID value extended will have MSB set */
0U, /* CanObjectId - Holds handle Id, for CAN User to do IO on specified Object Handle */
1U, /* Hw object Index, first Object in FIFO*/
8U, /* =1 => Single object, else FIFO starting with <HwHandle>*/
0U, /* CanObjectType - Direction of Mailbox,0= Rx or 1= Tx*/
FALSE, /* CanTriggerTransmitEnable - This parameter is not used*/
&CanConfigSet_0_CanController_0, /* Controller */
0U, /* CanHwFilterCode - This parameter is not used */
0x7F7, /* CanHwFilterMask */
8U /* Length of the Mailbox */
};
With mask set to 0, then all messages are received.
With mask set to 0x7F7 no messages frpom the list are received but sending a dummy message with ID 0x7F7 will be received.
When mask is set to one of the IDs inthe list, only the message with this ID is received.
The mailbox is behaving like a "full" mailbox type.
I need to be able to filter out some traffic as the FIFO size I've got is not large enough to contain all the messages received during each processing loops.
Some of those messages need to be gatewayed and they are getting dropped causing issues.
Thanks in advance for your help.
Regards
Seb