cancel
Showing results for 
Search instead for 
Did you mean: 

CAN1 RX issue

Ash1
Associate III

Hi

I am using STM32F407 evb in which I have configured both CAN1 and CAN2 ,I am sendind CAN1(3 ids 501,502,503) and vice versa from CAN2 same I am sending but I am ble to recive all three id on CAN2 Rx but only one ID iam receving on CAN1(501) .I am sahring my filter configuration I am using mask mode 

 

if (can_controller==0){

		for (int i=0; i <CAN_MAXTABLEID_0; i++)
		{
			Can_Configfilter[i].FilterIdHigh = (0x501 << 5);
			Can_Configfilter[i].FilterMaskIdHigh =(0xFFC << 5);
			Can_Configfilter[i].FilterIdLow = 0x00000000;      // Initialize if EXTID used
			Can_Configfilter[i].FilterMaskIdLow = 0x00000000;  //  Initialize if EXTID used
			Can_Configfilter[i].FilterFIFOAssignment = CAN_FILTER_FIFO_0;
			Can_Configfilter[i].FilterBank = i;                //Selection of filterBANk
			Can_Configfilter[i].FilterMode = CAN_FILTERMODE_IDMASK;  // Identifier mode
			Can_Configfilter[i].FilterScale = CAN_FILTERSCALE_32BIT;  // Scale selection
			Can_Configfilter[i].FilterActivation = CAN_FILTER_ENABLE;// Example activation
			Can_Configfilter[i].SlaveStartFilterBank=1;                //0-2 CAN1 filter

			Can_IPW_Can_ConfigFilter(&hcan,&Can_Configfilter[i]);  //Filter configuration
		}
}


	if (can_controller==1){

			for (int i=1; i <CAN2_MAXTFILTER; i++)
			{
				Can_Configfilter[i].FilterIdHigh = (0x501 << 5);
				Can_Configfilter[i].FilterMaskIdHigh =( 0xFFC << 5);
				Can_Configfilter[i].FilterIdLow = 0x00000000;      // Initialize if EXTID used
				Can_Configfilter[i].FilterMaskIdLow = 0x00000000;  //  Initialize if EXTID used
				Can_Configfilter[i].FilterFIFOAssignment = CAN_FILTER_FIFO_0;
				Can_Configfilter[i].FilterBank = i;                //Selection of filterBANk
				Can_Configfilter[i].FilterMode = CAN_FILTERMODE_IDMASK;  // Identifier mode
				Can_Configfilter[i].FilterScale = CAN_FILTERSCALE_32BIT;  // Scale selection
				Can_Configfilter[i].FilterActivation = CAN_FILTER_ENABLE;// Example activation
				Can_Configfilter[i].SlaveStartFilterBank=1;                //2-28 CAN2 filter

				Can_IPW_Can_ConfigFilter(&hcan,&Can_Configfilter[i]);  //Filter configuration
			}
	}

 

21 REPLIES 21

@Ash1 wrote:

yes because I am trying to send 6 continously ID with single delay at end .

I got your point thanks


So please accept the comment that answered your original question.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
SofLit
ST Employee

You accepted the wrong comment:

SofLit_0-1736163869198.png

I will mark the nearest comment that answered your question as "Accepted as Solution".

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.