Hello,
I am working on re-configuring FlexCAN Mailbox definitions for MPC5606B processor.
I am asked to make 32 Rx and 32 Tx Mailboxes ( 64 total ) able to receive/transmit messages with any IDs ( what means : Mask==0, Filter==0 ).
In the project I am working on all Mailboxes are defined using the following structure :
typedef struct
{
uint8 length;
Can_MbDirectionType ioType; /**< RX or TX */
Can_FilterMaskType filterMask;
Can_IdType id;
} Can_HardwareObjectType;
as an array of 56 objects of “Can_HardwareObjectType”,
For example ( just a couple of elements ) :
…
/* 2 - Message Name: BinaryEventConfigThreshold */
{
8u, /**< Length (bytes) */
CAN_DIR_RX, /**< Direction */
(Can_FilterMaskType)0x7ffu, /** Filter */
0x357u, /**< CAN Id if Extended ORed with 0x80000000 */
},
/* 3 - Message Name: D_Outputs */
{
1u, /**< Length (bytes) */
CAN_DIR_RX, /**< Direction */
(Can_FilterMaskType)0x7ffu, /** Filter */
0x311u, /**< CAN Id if Extended ORed with 0x80000000 */
},
…
As I am expected to make all Mailboxes receive/transmit messages with any IDs, I am re-defining them like this :
For Rx Mailboxes :
{
0u, /**< Length (bytes) */
CAN_DIR_RX, /**< Direction */
(Can_FilterMaskType) 0x0, /** Filter */
0x0u, /* CAN ID */
},
For Tx Mailboxes :
{
0u, /**< Length (bytes) */
CAN_DIR_TX, /**< Direction */
(Can_FilterMaskType) 0x0u, /** Filter */
0x0u, /* CAN ID */
},
My questions :
1) Am I defining them right ?
2) What should I specify for “Mailbox Length” field if I want to use the Mailboxes for receiving/transmitting messages with any IDs ?
Any ideas ?
Thank you for your help.