cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F0 CAN FIFO1

Giu S
Associate II
Posted on June 12, 2017 at 17:08

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on June 14, 2017 at 16:59

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.

View solution in original post

5 REPLIES 5
Posted on June 12, 2017 at 17:20

>>

go in an 'infinite loop'

Stopped in a debugger this where exactly? Hard Fault Handler, Default Handler?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 12, 2017 at 18:12

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_Handler

Thank you for your reply.

Posted on June 12, 2017 at 22:39

Check FIFONumber is in range.

Have an effective Hard Fault Handler routine

Make sure all IRQHandlers you need are correctly named and present

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 13, 2017 at 08:25

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.

Posted on June 14, 2017 at 16:59

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.