cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to generate FIFOs interrupts independently with the CAN_IT block?

RGalvez
Associate II

Hi everyone,

I'm working with the MCU STM32F303 and the Reference manual says the following:

0693W000005AuRDQA0.pngSo I'wondering if it would be possible to manage both interrupts separately with CAN_IT block. Currently with the block it seems that it's only possible to generate one interrupt associated with any receiving message at any mailbox.

Best regards,

Ruben

3 REPLIES 3
Bouraoui Chemli
ST Employee

Hi @Rubén Gálvez​ 

Yes,  it's only possible to generate one interrupt associated with any receiving message at any mailbox/by FIFO. ie. one interrupt for FIFO 0, one interrupt for FIFO 1.

But it can be managed at application level.

Bouraoui

RGalvez
Associate II

Hi @Bouraoui Chemli​ 

Thanks for your quick answer! Any suggest about managging at app level each FIFO's reading separatedly or finding which mailbox generated the interrupt?

I've got further questions:

  • Do I need to use CAN_Receive block with CAN_Read associated to same FIFO when enabling interrupts?
  • How does my defined interrupt routine's execution works? In case that a new interrupt occurs while the routine is being executed because there is an incoming message at one mailbox:
    • it waits until the excution is finished and right after the routine is executed by the second interruption,
    • the next interrupt routine caused by the second interruption is lost
    • or it stops current execution and starts new interrupt routine?
  • When the interruption is generated, does it empty the mailbox from pending message or does it only serves first message pending at the FIFO?
  • How much robust is the interrupt management? The generated code ensures that routine is executed without new interrupts? Or depends on the NVIC priorities settled on the .ioc file at CubeMX? Should I give maximum priority to CAN RX interrupt to ensure robustness and lossless reception?

I've search on Reference manual of my MCU but I haven't clarified all these doubts consistenly. Mainly because I don't know how HAL libraries are used by the block's generated code exactly.

Bouraoui Chemli
ST Employee

Hi @Rubén Gálvez​ 

You can refer to CAN example available with STM32F3 firmware: STM32Cube_FW_F3_V1.11.0\Projects\STM32303C_EVAL\Examples\CAN

Bouraoui