CAN Code in Interrupt Mode

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

CAN Code in Interrupt Mode

2,660件の閲覧回数
Dilip1441
Contributor I

Hi,

I'm Using the can_pal_s32k144 Example Code.

Actually the code is in Polled Mode,

I want to make it as Interrupt Mode(When ever the CAN Message Received then the Control need to go to CAN IRQ)

Also please suggest the What are the Changes required to make it works on interrupt mode.

 

Thank you.

0 件の賞賛
返信
3 返答(返信)

2,650件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

driver is always using CAN interrupt during receiving/transmitting. You can use callback function to have indication interrupt was called. You can refer e.g to https://community.nxp.com/t5/S32K-Knowledge-Base/Example-S32K144-FlexCAN-TX-RX-Error-ISR-test-S32DS2.... It uses flexcan driver. Can_pal will be quite similar, there is less events possible and no error callback.

BR, Petr

0 件の賞賛
返信

2,645件の閲覧回数
Dilip1441
Contributor I

Hi,
Can you please share the Process and Configuration for Enabling the CAN Receiving Interrupt in can_pal_s32k144 Example Code

[When ever the Data Received over the CAN Bus then Control need to go to the CAN IRQ]

0 件の賞賛
返信

2,640件の閲覧回数
PetrS
NXP TechSupport
NXP TechSupport

Hi,

as I wrote, no setting is needed for enabling interrupt for CAN SDK driver. The driver enables the interrupts for the corresponding CAN module. You can put breakpoint into FLEXCAN_IRQHandler within flexcan_driver.c file. This will be entered if CAN_Receive is called and message comes and match with configured one.

BR, Petr

0 件の賞賛
返信