i.mx Flexcan message buffers > 16 usable?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.mx Flexcan message buffers > 16 usable?

ソリューションへジャンプ
1,293件の閲覧回数
slay
Contributor III

Hi Everyone,

Based on the Linux Flexcan driver, I try to use more message buffers for transmitting and receiving some frames with specific ID's. This seems to be OK as long as I don't try to use message buffers 16 and further. If I configure for instance MB[9] to MB[12] for receiving a range of ID's, this works just fine. If I copy the same configuration to MB[16] - MB[19], no frame is rcved (the iflag1 bit of these MB's never gets set). Also, if I just change the FLEXCAN_TX_BUF_ID of the standard Flexcan driver from 8 to 16, transmitting frames no longer succeeds.

I did find a paragraph in the user manual about the "Arbitration and Matching Timing", regarding the number of message buffers that can be used depending on the ratio between Peripheral Clock Frequency and CAN Bit Rate. But this should not be the problem in the configuration I use here:

oscillator frequency = 24 MHz

Prescaler = 3 => Bitclock = 8 MHz

Bitrate = 500 Kbit => 1 bit = 16 Tq

So it should be possible to use all 64 Message buffers, I would think. Does anyone know what I am missing here? Did anyone succeed in using these higher message buffers on this processor?

Regards,

Ruud

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,049件の閲覧回数
slay
Contributor III

Solved! By looking at the driver code of the Freescale maintained BSP, I noticed the  'maxmb' part of the MCR. This part is not set for the mainline driver and will therefore have the default value 0x0F, meaning that only MB's 0-15 will be used for receive and transmit purposes. This explains why I could not use MB's 16 - 63. By changing this to a higher value, the other message buffers can also be used. I have set it to 0x1F now, to use up to 32 message buffers.

Ruud

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,050件の閲覧回数
slay
Contributor III

Solved! By looking at the driver code of the Freescale maintained BSP, I noticed the  'maxmb' part of the MCR. This part is not set for the mainline driver and will therefore have the default value 0x0F, meaning that only MB's 0-15 will be used for receive and transmit purposes. This explains why I could not use MB's 16 - 63. By changing this to a higher value, the other message buffers can also be used. I have set it to 0x1F now, to use up to 32 message buffers.

Ruud

0 件の賞賛
返信