cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 FILTERING

akshayamk
Associate II
Posted on January 06, 2016 at 11:06

I am using a STM32F302 custom made board.

I have configured my filter banks as follows to configure message received from controller:


 uint16_t STID4 = (0x02 << 9) | (0x18 << 3) | 0x06; //0x4c6 
sFilterConfig.FilterNumber = 3; 
sFilterConfig.FilterMode = CAN_FILTERMODE_IDMASK; 
sFilterConfig.FilterScale = CAN_FILTERSCALE_16BIT; 
//sFilterConfig.FilterIdLow = (GROUP2 << 9) | (Slave.MacId << 3) | GRP2_UNCONNECTED_REQ; 
sFilterConfig.FilterIdHigh = ((STID4 << 5) & 0xFFE0); 
//sFilterConfig.FilterMaskIdLow = 0x7ff; 
sFilterConfig.FilterMaskIdHigh =0xFFE0; 
sFilterConfig.FilterFIFOAssignment = CAN_FILTER_FIFO0; // Filter FIFO 0 assignment for filter x 
sFilterConfig.FilterActivation = ENABLE; 
sFilterConfig.BankNumber = 2; 

However, I am not able to obtain the MACID and MsgID that I am expecting from this filter configuration. Any suggestions?? Must I amend my filter configuration settings for this?? Also, does the way of configuring transmit message affect the receive message obtained? Sorry, unclear about such details as I am not able to find these in ST's data sheet or user manual.
0 REPLIES 0