2017-06-12 08: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.
2017-06-14 09: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.
2017-06-12 08:20 AM
>>
go in an 'infinite loop'
Stopped in a debugger this where exactly? Hard Fault Handler, Default Handler?
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.
2017-06-12 03: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
2017-06-13 01: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.
2017-06-14 09: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.