MK64 + FreeRTOS + FlexCAN interrupt

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

MK64 + FreeRTOS + FlexCAN interrupt

917件の閲覧回数
wfwf
Contributor II

Hello,

I'm trying to make the FlexCan (KSDK 1.3.0) driver work under FreeRTOS (8.2.2) on a Kinetis K64 cpu. In order to configure the CAN, I'm succesfully following the example in C:\Freescale\KSDK_1.3.0\examples\twrk64f120m\driver_examples\flexcan\flexcan_network  in a baremetal configuration.

The problem arises using instead FreeRTOS since I'm not getting any interrupt on any incoming CAN message. I'm not putting external API inside the "CAN0_ORed_Message_buffer_IRQHandler" interrupt, but just using the standart IRQ handler provided (See FreeRTOS - Open Source RTOS Kernel for small embedded systems , point 5.)

The configuration of the CAN peripheral using  is done before the main thread and the scheduler starts, just after the PE_Low_Level.

According to the FreeRTOS FAQ page I set up the

"#define configASSERT( ( x ) ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }"
for debug purposes

 

Any Idea on it? how can I double check if the interrupt priority is correct?

Is there any tutorial or link on integrating the CAN on FreeRTOS?

 

Other interesting discussion FreeRTOS and K64 Interrupt Priority 

thank you

Walter

ラベル(1)
0 件の賞賛
2 返答(返信)

532件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I think all the driver of serial bus have the same architecture in SDK, I suggest you refer to the example in Freertos:

C:\Freescale\SDK2.0_FRDM_K64F\boards\frdmk64f\rtos_examples\freertos_uart\kds

BR

Xiangjun Rong

0 件の賞賛

532件の閲覧回数
wfwf
Contributor II

news: by repeating the full initialization inside the CAN thread, I succeded in receiving a CAN message. I'll further investigate which initialization part in particular must be repeated. Furthermost, even with this second initialization the "SendBlocking" method doesn't work. The  "Send" method works outside the thread but doesn't worh IN the thread. Which is the difference between the two methods?

thank you

0 件の賞賛