FlexCAN Interrupt/Polling

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

FlexCAN Interrupt/Polling

ソリューションへジャンプ
820件の閲覧回数
Noobie
Contributor I

Hello,

I'm using MPC5777C controller.

How can I configure flexCAN Rx to polling method and Tx to interrupt method.
What are the registers I've to configure for this ?

Thanks in advance.

0 件の賞賛
返信
1 解決策
763件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, some of interrupt sources are ORed together for single interrupt vector, but still those interrupt requests are masked by bits in IMASK registers. So if you set bits 0 and 1 in IMASK2 register (which correspond to MB62 and MB63) then interrupt will be called after message are transmitted from MB62 and MB63 only. Within interrupt clear just MB62 and MB63 flags.

BR, Petr

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
775件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

each MB has has respective flag and mask interrupt bit in IFLAGn and IMASKn register. MB's flag is set upon successful message transmission or reception. If respective MB's mask bit is set then interrupt request is generated to the core. So for pooling keep mask bit cleared and for interrupt method set mask bit for respective MB.

BR, Petr

0 件の賞賛
返信
769件の閲覧回数
Noobie
Contributor I

Hi @PetrS 
 

Thank you for your response.

The below attached snap is from data-sheet. The vector table shows different interrupt vector for MB 0 - MB 16.  But shared between MB16 to MB31 and MB32 to MB63.

Noobie_0-1687168525216.png

In my configuration I'm trying to configure only the MB62 and MB63 for Tx. whereas MB0 to MB61 for Rx.
I want ISR to be invoked only for MB62 and MB63(For Tx only), But with this configuration my ISR function is invoked because of Rx, when messages are received at MB32 to MB61.

How can I fix this issue ?

 

0 件の賞賛
返信
764件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, some of interrupt sources are ORed together for single interrupt vector, but still those interrupt requests are masked by bits in IMASK registers. So if you set bits 0 and 1 in IMASK2 register (which correspond to MB62 and MB63) then interrupt will be called after message are transmitted from MB62 and MB63 only. Within interrupt clear just MB62 and MB63 flags.

BR, Petr

0 件の賞賛
返信