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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
1,252件の閲覧回数
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,067件の閲覧回数
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,068件の閲覧回数
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,067件の閲覧回数
arnogir
Senior Contributor II

Ok

Thank for this information.

I will study the best possibilities for my use case.

Thank you

0 件の賞賛
返信