s32k312 flexcan

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

s32k312 flexcan

Jump to solution
688 Views
fengba_360
Contributor III

您好,我在使用s32k312 配置flexcan过程中有以下问题:

1.中断设置 要不要配置handle 函数(附件图片标红处),如果需要配置,那么每一路flexcan 应该配置成什么?

2.FlexCAN0_0_IRQn,FlexCAN0_1_IRQn,分别代表什么中断?handle函数应该怎么设置?

2.如果中断已经设置好,是否在代码里面还需要使用IntCtrl_Ip_EnableIrq()IntCtrl_Ip_InstallHandler()安装和注册中断函数。

谢谢!微信图片_20240803184442.png

0 Kudos
Reply
1 Solution
632 Views
fengba_360
Contributor III
好的,谢谢 已经解决

View solution in original post

0 Kudos
Reply
2 Replies
645 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi fengba,

建议参考All Example S32K312 DS3.5 RTD-3.0.0里的CAN例程有配置这些。

需要配置与/RTD/src/FlexCAN_Ip_Irq.c里定义的handler名字,比如CAN0_ORED_IRQHandler、CAN0_ORED_0_31_MB_IRQHandler、CAN0_ORED_32_63_MB_IRQHandler。

/RTD/src/FlexCAN_Ip_Irq.c和参考手册附件里的S32K3xx_interrupt_map.xlsx都有介绍各个handler的含义。

如果你没使用IntCtrl_Ip_Init 和 IntCtrl_Ip_ConfigIrqRouting整体初始化IntCtrl_Ip里配置的,那么就需要单独使用IntCtrl_Ip_EnableIrq和IntCtrl_Ip_InstallHandler逐个实现。

Best Regards,
Robin
-------------------------------------------------------------------------------
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
Reply
633 Views
fengba_360
Contributor III
好的,谢谢 已经解决
0 Kudos
Reply