RECIVE MESSAGE IN FIFO1 ON CAN BUS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-30 7:45 AM
hi evry one
i working on CAN protocol with stm32f103rbt6.it working so good.now problem is here: when i reading mailboxs of FIFO0 ØŒall think is ok but i can not receive the message from FIFO1.please tell me how to do thisthank you- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-31 5:09 AM
Hi khastar.mehdi,
To make thing more clear , are you using both FIFO0 and FIFO1 ? are you configuring filters ? -Hannibal-- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-31 5:50 AM
Hi Hannibal
yes. I configure my filter for FIFO1.But i can not Receive any thing.sFilterConfig.FilterNumber = 2;sFilterConfig.FilterMode = CAN_FILTERMODE_IDLIST;sFilterConfig.FilterScale = CAN_FILTERSCALE_16BIT;sFilterConfig.FilterIdHigh = 0xFEEF; sFilterConfig.FilterIdLow = 0xF7E0; sFilterConfig.FilterMaskIdHigh = 0x3DF8;sFilterConfig.FilterMaskIdLow = 0xFFF8;sFilterConfig.FilterFIFOAssignment = 1;sFilterConfig.FilterActivation = ENABLE; and i use this code for receive message in interrupt modeHAL_CAN_Receive_IT(&hcan,1);but i do not receive any interrupt event in this modeso please tell me what do i do????thank you- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-31 9:19 AM
What messages exactly are you trying to receive? Please try to provide some context.
The filter looks badly created, it will filter a subset of messages with these IDs and RTR/IDE/EXID bitsFEEF : 7F7F7E0 : 7BF3DF8 : 1EFFFF8 : 7FFUp vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-31 12:42 PM
hi clive1.thank you for your feedback.
yes .my filter receive the messages with : 0x7F7 - 0x7BF- 0x1EF- 0x7FF IDsall messages receive by FIFO0 without problem.but i can not receive any message in FIFO1.in user manual :Receive FIFOTwo receive FIFOs are used by hardware to store the incoming messages. Three completemessages can be stored in each FIFO.The FIFOs are managed completely by hardware
.so how can receive message in FIFO1???????thank you- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-08-31 2:09 PM
I'm not using F1 with HAL, so not going to be able to provide you with much assistance as it relates to functionality there.
Do you fully initialize the filter structure? BankNumber?Do you get an error reported by HAL when configuring the filter?Do you enable the right IRQ?Try using the 16 or 32-bit ID's where you just mask the message bits, rather than use the list format.Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-01 1:23 AM
yes.i fully initialize the filters and it works good.
no.i do not get any error. i can receive messages in interrupt mode from FIFO0.so IRQ settings is true.i do not where is problem??can you receive message from FIFO1????if yes how do you do it??thank you- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-01 5:37 AM
Your code shows filter 2. What are the settings for other filters. It may be your message matches a higher priority filter first, sending it to the wrong FIFO. Does your message arrive on FIFO0?
Are you sure the message being sent has the right ID?
Jack Peacock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-01 6:56 AM
hi peacock.
yes i receive message in FIFO0.with this filter configuration . when i use ''HAL_CAN_Receive_IT(&hcan,0)'' i receive message from FIFO0 but when i use ''HAL_CAN_Receive_IT(&hcan,1)'' i can not receive any message.in filter configuration، change the fifo number and filter bank number has no effect.can you receive message from FIFO1?if yes please put your code and filter configuration.thank you- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2016-09-01 8:06 AM
Hi khastar.mehdi,
It is related to a recent reported bug in Receive function about FiFONumber. It is under fix phase. Meanwhile , add the following line into can_Receive_IT() function before FMI line :hcan->pRxMsg->FIFONumber = FIFONumber;
Check threads related to this topic:
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Configure%20CAN%20to%20receive%20in%20both%20FIFOs&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=53]thread1[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Java/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Java/%5bSTM32F2%5d%20issue%20with%20CAN-HAL%20interrupt%20receivng&FolderCTID=0x01200200770978C69A1141439FE559EB459D758000F9A0E3A95BA69146A17C2E80209ADC21¤tviews=18]thread2
-Hannibal-