2016-06-10 05:03 AM
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 messagesfor which it is configured(using some GUI utility). So i need to implement this filter mechanism in my code.I am using STM8SAF52Ax mcu withIAR 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.ThanksAmit KumarEmail-amitkrv22@outlook.com #becan #can-message-filtering2016-06-18 07:19 PM
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¤tviews=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¤tviews=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