CAN Code in Interrupt Mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CAN Code in Interrupt Mode

2,992 次查看
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,982 次查看
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,977 次查看
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,972 次查看
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 项奖励
回复