How do I disable the MQX FlexCAN driver?

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

How do I disable the MQX FlexCAN driver?

跳至解决方案
1,138 次查看
robertyork
Contributor II

I've been struggling with the MQX 4.1 FlexCAN driver. So far, I've gotten through most of the issues, but I'm getting stuck on receiving data. Rather than bang my head trying to figure it out, It's been suggested I try the PE CAN driver. I've been told it's a lot simpler.  One note I saw was that I need to disable the MQX FlexCAN driver in the user_config.h. However, I can't find any mention of any CAN driver in user_config.h. I had to modify the init_gpio.c file to point to the correct pins for my board, but I don't see anything else about disabling it. Any idea how I stop MQX from initializing it? The only other method I could think of would be to remove the configuration info from init_gpio.c

0 项奖励
回复
1 解答
897 次查看
soledad
NXP Employee
NXP Employee

Hello Robert,

By default the driver is disable. Some of the device drivers such as Timer, FlexCAN, RTC, etc. and the interrupt controller drivers implement a custom API and do not follow the standard driver interface. That means,the FlexCAN driver is not POSIX, only POSIX standard I/O are defined in the user_config.

In order to able the driver you need to use the function flexcan_init ().


Have a great day,

Sol

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
898 次查看
soledad
NXP Employee
NXP Employee

Hello Robert,

By default the driver is disable. Some of the device drivers such as Timer, FlexCAN, RTC, etc. and the interrupt controller drivers implement a custom API and do not follow the standard driver interface. That means,the FlexCAN driver is not POSIX, only POSIX standard I/O are defined in the user_config.

In order to able the driver you need to use the function flexcan_init ().


Have a great day,

Sol

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

0 项奖励
回复
897 次查看
robertyork
Contributor II

Excellent. I've been calling the init(), so I'll just stop calling it. This will make it a lot easier to swap between the two without having to rebuild as much. Thanks a bunch!

0 项奖励
回复