FlexCAn receive any CAN message(Without any filter)??

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FlexCAn receive any CAN message(Without any filter)??

1,881 Views
saireddy_saredd
Contributor III

HI,

Is any one have example FlexCAN can receive any can message(With out filter)??

Can we receive FlexCan message without using RxMb and RxFIFO?? 

Best Regards,

Sai

Tags (1)
5 Replies

1,748 Views
saireddy_saredd
Contributor III

Hi @Alexis Andalon

 

My requirement is only receive either standard or extended CAN frames based fileter using RxFIFO. So I did not set specific IDs in fileter.

I only set Global mask as it shows below.

  FLEXCAN_DRV_SetRxFifoGlobalMask(INST_CANCOM1, FLEXCAN_MSG_ID_STD, 0);

But the Application aslo receiving the extended frames. If I will not set any Global mask application not receiving any CAN frame.

 

Also I tried with Extended flag

   FLEXCAN_DRV_SetRxFifoGlobalMask(INST_CANCOM1, FLEXCAN_MSG_ID_EXT, 0);

or

    FLEXCAN_DRV_SetRxFifoGlobalMask(INST_CANCOM1, FLEXCAN_MSG_ID_EXT, 0x10000000);

This also accepting both standard and extended flags.

 

Is there any way to receive any standard or extended frames using global mask with RXFIFOs.

 

 

Best Regards,

Sai

0 Kudos

1,748 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello SAIDHIREDDY,

I think I'm not understanding your requirements, in the previous post you mention that you want to set 0x80 and 0x4bc0001, so for this, it will be better to set both filters in the ID filter table and set the global mask to 0x1FFFFFFF, with this you will be able to only accept this two filters.

Best Regards,

Alexis Andalon

0 Kudos

1,748 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hi saireddy.sareddy@gmail.com‌,

Unfortunately, you can't receive a message without using a mailbox or FIFO, but if you want to receive any message in a mailbox you can set the individual mask = 0 and if this is set, independently of the ID set in the MB.

Best Regards,

Alexis Andalon

1,748 Views
saireddy_saredd
Contributor III

Hi Alexis,

Thanks for info,

I am bit confusing with the filters concept with NXP micro controllers

FLEXCAN_DRV_SetRxFifoGlobalMask(INST_CANCOM1, FLEXCAN_MSG_ID_STD, 0);
FLEXCAN_DRV_SetRxIndividualMask(INST_CANCOM1, FLEXCAN_MSG_ID_STD, RX_MAILBOX, 0);

If I set the masks like above snippet 

Is it going to accept only standard frames??

FLEXCAN_MSG_ID_STD is this flag decides the standard or exdended frames filtering??

FLEXCAN_DRV_SetRxFifoGlobalMask(INST_CANCOM1, FLEXCAN_MSG_ID_EXT, 0);
FLEXCAN_DRV_SetRxIndividualMask(INST_CANCOM1, FLEXCAN_MSG_ID_EXT, RX_MAILBOX, 0);

Is this going to receive only extended frames??

Please give one some explanation for filtering

I want set standard Id 0x08 and extended ID: 0x4bc0001 seperately? How can I set subnet mask for those IDs in FIFO mode??

Thanks in advance :smileyhappy:

Best Regards,

Saidhi reddy Sareddy

0 Kudos

1,748 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello Saidhireddy,

If you want to accept the standard or extended you need to set the filters with the format A, check the Table 55-21. You can check the following post that shows how to configure it. 

Best Regards,

Alexis Andalon

0 Kudos