Is it possible to configure a event or ISR for particular MB in FlexCAN S32k144?

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

Is it possible to configure a event or ISR for particular MB in FlexCAN S32k144?

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

Hi Team

I was exploring all the possible things , which can be done in FlexCAN module 

I just wanted to know , if we can configure a event or ISR for particular MB ?

I'm aware that CAN has only 2 ISR for MB's (CAN0_ORed_0_15_MB_IRQHandler & CAN0_ORed_16_31_MB_IRQHandler) , but is it possible to have a particular event only for particular MB using SDKs 

If we cant configure like that , what is a best available approach for the same ??

 

Regards 

Karthik SV

Best Regards
KARTHIK SV
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,455件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@KARTHKSARODE

         The method you said may not be supported,as you can see : "some of these sources are OR'd together to generate a single request." this should means that the specific ISR for  each MB are not supported.

Senlent_1-1637573508270.png

      In fact, you can judge which MB caused the interrupt in the interrupt service function,and this method is exactly the same as what you want.

for example.

void Can_Callback(uint8_t instance,flexcan_event_type_t eventType,uint32_t buffIdx,flexcan_state_t *flexcanState)
{
  switch(eventType)
   {
     case FLEXCAN_EVENT_RX_COMPLETE:
	  //judge which MB cause the interrupt
          if(mb_idx_1 == buffIdx)
          {
            FLEXCAN_DRV_Receive(INST_CANCOM1,mb_idx_1,&recvMsg);
          };
	  .
          .
	  .
          break;
			
     case FLEXCAN_EVENT_TX_COMPLETE:
          break;
	
    default:
          break;
   }
}

BR! 

     Jim,

---------------------------------------------------------------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------------------------------------------------------------------

 

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,456件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@KARTHKSARODE

         The method you said may not be supported,as you can see : "some of these sources are OR'd together to generate a single request." this should means that the specific ISR for  each MB are not supported.

Senlent_1-1637573508270.png

      In fact, you can judge which MB caused the interrupt in the interrupt service function,and this method is exactly the same as what you want.

for example.

void Can_Callback(uint8_t instance,flexcan_event_type_t eventType,uint32_t buffIdx,flexcan_state_t *flexcanState)
{
  switch(eventType)
   {
     case FLEXCAN_EVENT_RX_COMPLETE:
	  //judge which MB cause the interrupt
          if(mb_idx_1 == buffIdx)
          {
            FLEXCAN_DRV_Receive(INST_CANCOM1,mb_idx_1,&recvMsg);
          };
	  .
          .
	  .
          break;
			
     case FLEXCAN_EVENT_TX_COMPLETE:
          break;
	
    default:
          break;
   }
}

BR! 

     Jim,

---------------------------------------------------------------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
---------------------------------------------------------------------------------------------------------------------------------------

 

0 件の賞賛
返信