FlexCAN echo for all pass filter

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

FlexCAN echo for all pass filter

4,806 Views
pdnr7
Contributor II

I am using KW36Z, when i set all pass filter in CAN all the transmit frame is reflected back in receive FIFO. is there any way to stop this from driver level.

Tags (2)
0 Kudos
Reply
12 Replies

4,781 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @pdnr7,

 

The FlexCAN receives frames transmitted by itself if another device on the CAN bus acknowledges the data. If no other node acknowledges the frame, an ACK error is generated and, the module does not receive the frame sent by itself.

One solution could be to set up the Self Reception Disable register (SRXDIS) to 1b, which disables the reception of frames transmitted by itself.

 

Best regards, Julian

4,723 Views
pdnr7
Contributor II

Hi,

 

Setting SRXDIS is not helping, behavior is same echo is still happening only case of all pass filter(mask 0x0, filter 0x0)

0 Kudos
Reply

4,712 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @pdnr7,

This could also be caused by your device sending data back, could you please confirm if all your nodes are different devices? Or are you testing this project with various KW36Z?

Also, please confirm if Loop Back Mode (LPB) is enabled, as this could be another cause. 

As an alternative, you could set up a filter that ignores the frame when the ID of the frame matches the ID of the FlexCAN MB. You may filter out self-received frames on hardware level by configuring ID masking (Rx Mask Registers RXGMASK, RX14MASK and RX15MASK).

Best regards, Julian

0 Kudos
Reply

4,702 Views
pdnr7
Contributor II

Hi @Julián_AragónM

Thanks for detailed explanation.

1, Yes the other nodes are CAN emulator(PCAN-USB). Sent data from NXP(FlexCan) is being successfully received at other nodes(PCAN-USB).

2,

 nxp_all_pass_filter.PNG

3, My application(a well known industrial protocol) requires a all pass filter, and it will have to send can messages with different IDs at run time based on the traffic.

 

Also if i set all pass filter with format = kFLEXCAN_FrameFormatExtend or kFLEXCAN_FrameFormatStandard .I am getting rx data for both extended and standard.

0 Kudos
Reply

4,607 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hello,

It seems Peak's System device (PCAN-USB) has a feature for confirmation of frames, regarding its manual on chapter 7.1, which echoes frames to confirm physical transmission. Could you please revise this feature on your devices to see if that's the cause of the problem?

Best regards, Julian

0 Kudos
Reply

4,590 Views
pdnr7
Contributor II

PCAN-USB is tested with other devices with the same settings, this is not happening with other devices.

0 Kudos
Reply

4,576 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi,

I would like to review your code since none of the solutions are working. Would it be possible for you to share your project?

Best regards, Julian.

4,538 Views
pdnr7
Contributor II

Hi @Julián_AragónM ,

 

I am sharing the part of my can module(which has only driver related things).

 

0 Kudos
Reply

4,477 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hello,

I reviewed your code and it appears the register activation for SRXDIS is not present, or at least I couldn't find it, have you removed it once you confirmed it didn't work? Or is it present somewhere else? 

Best regards, Julian

0 Kudos
Reply

4,471 Views
pdnr7
Contributor II

Hi,

Yes, I removed SRXDIS after setting and testing it.

0 Kudos
Reply

4,377 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi,

I've been testing this issue with the FlexCAN SDK, and this issue is not present on our example. Could you please confirm to us which mailbox are you using to receive messages? And if it is possible, a screenshot of the CAN bus line in the reception and of the board's registers to see if it is present on the line or the board.

Best regards, Julián

0 Kudos
Reply

4,775 Views
pdnr7
Contributor II

Hi,

There are 2 more nodes present other than NXP(Flexcan). This is observed only when the ID is 0x0 and Mask is 0x0 and I am getting callback function called twice with "status_t"  "kStatus_FLEXCAN_RxIdle" followed by "kStatus_FLEXCAN_TxIdle".

0 Kudos
Reply