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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,197 Views
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
Labels (1)
Tags (1)
0 Kudos
1 Solution
1,188 Views
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.
---------------------------------------------------------------------------------------------------------------------------------------

 

View solution in original post

0 Kudos
1 Reply
1,189 Views
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 Kudos