STM32F0 CAN FIFO1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-06-12 8:08 AM
Hello to all,
I'm new in STM32. I have to use the CAN peripheral on the STM32F091VCTx microcontroller.
I'm able to send messages and receive messages in the FIFO0, but if I try to use the FIFO1 the software go down and go in an 'infinite loop' that I don't know what does it means. I have the last version of CubeMx and I use AC6 IDE.
Could someone explain to me what is the problem with FIFO1? How I can use it?
Thank you very much.
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-06-14 9:59 AM
Ok, I have the solution!
I write only this:
hcan.pTxMsg = &TxM;
hcan.pRxMsg = &RxM;and I forgot this:
hcan.pRx1Msg = &RxM1;Now it works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-06-12 8:20 AM
>>
go in an 'infinite loop'
Stopped in a debugger this where exactly? Hard Fault Handler, Default Handler?
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
‎2017-06-12 11:12 AM
after this instruction (but only for FIFO1, because for FIFO0 it works good):
pRxMsg->IDE = CAN_RI0R_IDE & hcan->Instance->sFIFOMailBox[FIFONumber].RIR;
It goes here:
.section .text.Default_Handler,'ax',%progbits
Default_Handler:
Infinite_Loop:b Infinite_Loop.size Default_Handler, .-Default_HandlerThank you for your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-06-12 3:39 PM
Check FIFONumber is in range.
Have an effective Hard Fault Handler routine
Make sure all IRQHandlers you need are correctly named and present
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
‎2017-06-13 1:25 AM
I checked but is ok.
Before this problem I used an older version of CubeMx and with that version, I'm able to youse both FIFO, but only one at a time. Then I updated my cubemx to the last and with this version the FIFO1 generate this problem and I can't use it.
Thank you very much if someone else has the same experience and knows how to solve it is welcome.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-06-14 9:59 AM
Ok, I have the solution!
I write only this:
hcan.pTxMsg = &TxM;
hcan.pRxMsg = &RxM;and I forgot this:
hcan.pRx1Msg = &RxM1;Now it works.
