New CAN drivers: Use it as "non blocant" task

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

New CAN drivers: Use it as "non blocant" task

跳至解决方案
1,255 次查看
arnogir
Senior Contributor II

Hello,

I'm working on a K60/K70 150M and MQX 4.2.

I want use the CAN. I seen 2 example provided with MQX.

One for the "old" CAN driver, other  one for the New CAN driver.

I would like use the newest CAN driver, but example make task bloquant. The example using oldest CANd river, is an example with non bloquant function (using interrupt and working on interrupt mask)

Are they example of the new CAN driver using non bloquant function? (Must we use interrupt and manage IT flag in its?)

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

Hello Arnaud,

Unfortunately there is no an example like you need. In the example with the new CAN driver, it uses the API function flexcan_start_receive(), this function locks Rx MB or Rx FIFO after getting an interrupt for an Rx MB or an Rx FIFO, gets the Rx MB or Rx FIFO field values, and unlocks the Rx MB or the Rx FIFO.

It is possible to use interrupts, below you can find the API functions:

flexcan_irq_handler()

FLEXCAN_Int_enable()

FLEXCAN_Int_disable()

FLEXCAN_Install_isr()

flexcan_uninstall_isr()

FLEXCAN_Install_isr_boff_int()

flexcan_uninstall_isr_boff_int()

FLEXCAN_Install_isr_wake_int()

flexcan_uninstall_isr_wake_int()

Please check more information in the Freescale MQX™ RTOS I/O Drivers User’s Guide located at the path: C:\Freescale\Freescale_MQX_4_2\doc\mqx

page 197.


Have a great day,
Sol

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

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,071 次查看
soledad
NXP Employee
NXP Employee

Hello Arnaud,

Unfortunately there is no an example like you need. In the example with the new CAN driver, it uses the API function flexcan_start_receive(), this function locks Rx MB or Rx FIFO after getting an interrupt for an Rx MB or an Rx FIFO, gets the Rx MB or Rx FIFO field values, and unlocks the Rx MB or the Rx FIFO.

It is possible to use interrupts, below you can find the API functions:

flexcan_irq_handler()

FLEXCAN_Int_enable()

FLEXCAN_Int_disable()

FLEXCAN_Install_isr()

flexcan_uninstall_isr()

FLEXCAN_Install_isr_boff_int()

flexcan_uninstall_isr_boff_int()

FLEXCAN_Install_isr_wake_int()

flexcan_uninstall_isr_wake_int()

Please check more information in the Freescale MQX™ RTOS I/O Drivers User’s Guide located at the path: C:\Freescale\Freescale_MQX_4_2\doc\mqx

page 197.


Have a great day,
Sol

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

0 项奖励
回复
1,070 次查看
arnogir
Senior Contributor II

Ok

Thank for this information.

I will study the best possibilities for my use case.

Thank you

0 项奖励
回复