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?)
Solved! Go to Solution.
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
Ok
Thank for this information.
I will study the best possibilities for my use case.
Thank you