How do I disable the MQX FlexCAN driver?

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

How do I disable the MQX FlexCAN driver?

Jump to solution
596 Views
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 Kudos
1 Solution
355 Views
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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
356 Views
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 Kudos
355 Views
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 Kudos