cancel
Showing results for 
Search instead for 
Did you mean: 

CAN received message filtering mechanism

amitkrv22
Associate II
Posted on June 10, 2016 at 14:03

Hi all,

I am working on some CAN communication project which allows us to control some external device attached to one node from some other node.

Since the CAn bus is a broadcast network and hence a message sent by a node will be received by every other CAn node on the bus. 

My requirement is that i need to implement a filteration mechanism for the nodes so that a node will only act upon those received messages

for which it is configured(using some GUI utility). So i need to implement this filter mechanism in my code.I am using STM8SAF52Ax mcu with

IAR embedded workbench as developement enviornment.

How could i implement this filter process of can messages.I also did web search and read many other tutorials but still i am unable to figure out what to be done. There are use of CAN filter Id and filter mask but i am unable to decide what value to be loaded in these and how to calculate these values.

Please suggest some tutorials or any explanations or some examples.

Thanks

Amit Kumar

Email-amitkrv22@outlook.com 

#becan #can-message-filtering
1 REPLY 1
Posted on June 19, 2016 at 04:19

I expect it is similar to the STM32 implementation. ie top 11 bit are the ID, assuming bits in transmission order, high order first.

You could review these, and the reference material for your part.

[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=79]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32%20CAN%20acceptance%20mask&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=79

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/STM32F4%20-%20can%20bus%20Id%20filters%20configuration&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21&currentviews=135]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2FSTM32Java%2FSTM32F4%20%2D%20can%20bus%20Id%20filters%20configuration&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=135

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..