cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F105 Dual CAN Filters

Hamid.Wasti
Associate II
Posted on April 24, 2015 at 12:18

On this processor both bxCAN cells share the filters located in CAN1. There is only a single CAN_FFA1R register whose bits are used to assign individual filters to FIFO 0 or FIFO 1. There is no bit allocating them to CAN1 or CAN2. Does this mean that when both CAN1 and CAN2 are active, they must have exactly the same filters?

#bxcan #filter #stm32f2
5 REPLIES 5
jpeacock
Associate II
Posted on April 24, 2015 at 13:59

The CAN_FMR register is used to set the break between filters for CAN1 and filters for CAN2.  The first n filters apply to CAN1, the rest to CAN2.

  Jack Peacock

Hamid.Wasti
Associate II
Posted on April 24, 2015 at 14:25

Where are you finding the definition for the CAN_FMR register?

In RM0008 Rev 15 (June 2014) ''STM32F101xx....STM32F105xx.... Reference Manual'' CAN_FMR register on page 682 has only a single bit defined. This is the FINIT bit which selects between normal and initialization mode. The remaining 31 bits are reserved.

In the same document, CAN_FM1R register on page 683 is used to select between mask and list modes. The lower 28 bits are used for this. The upper 4 bits are reserved.

jpeacock
Associate II
Posted on April 24, 2015 at 18:13

That looks like the RM for single CAN versions.  I have an older version from May 2011 that does show the bank select for FMR.

Bits 13:8

CAN2SB[5:0]

:

CAN2 start bank

These bits are set and cleared by software. They define the start bank for the CAN2

interface (Slave) in the range 1 to 27.

Hamid.Wasti
Associate II
Posted on April 25, 2015 at 04:44

Thanks for the info. RM0008 is supposed to cover STM32F105xx, and STM32F107xx, both of which are dual CAN chips. The datasheet talks about other aspects of how the two CAN modules interact.

I think this is a potential documentation bug and the next step is for me to start a support case with ST.

Thanks again for your help.

Edited to add: On the latest version of RM0008, the document revision history states: ''Updated definition of CAN2SB bits in Section : CAN filter master register (CAN_FMR).'' Looks like they may have deleted this bit field for some reason.  I will post the answer when I hear back from support.

Hamid.Wasti
Associate II
Posted on April 29, 2015 at 19:38

I heard back from Technical Support the next business day. They confirmed that the definition for the CAN_FMR register in the latest version of RM0008 is incorrect.

The CAN2SB bits still exist and are still in the positions reported earlier in this thread by peacock.jack.003 from the 2011 version of this document. Using these bits one can allocate some of the filters to CAN1 and the remaining to CAN2.

ST Technical Support provided an updated copy of the register definition, which is attached.

________________

Attachments :

CAN_FMR_Reg.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0gj&d=%2Fa%2F0X0000000bek%2FygLtsSfqyI2BGnMJPhotqh7x7I0PdPrH1GjZ5DU83KA&asPdf=false