How to give a semaphore in UART interrupt handler (K66)

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

How to give a semaphore in UART interrupt handler (K66)

1,973件の閲覧回数
thaophan
Contributor II

Hi everyone

I'm a newbie in kinetis microcontroller and Freertos. I have some questions as follow:

1. How to config an uart with RX interrupt handler using rtos driver. 

2. If I config uart with functions in driver_examples for uart interrupt, how can i give a binary semaphore in that interrupt handler to call a task.

Thank you.

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

1,416件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi, Thao,

As you know that the SDK2.0 support K66, you can download the SDK2.x from the link:

http://www.nxp.com/ksdk

We have integrated FreeRTOS os in the sdk, pls refer to the example for the freertos:

C:\Freescale\SDK2.0_TWR-K65\boards\twrk65f180m\rtos_examples\freertos_uart

This is the architecture of firmware of the example, In the UART ISR, when the predefined number of data has been received already, the callback functioin is called, the in the callback function, a semaphore is posted, which will have the task to be load/run automatically which is waiting the semaphore.

Hope it can help you

BR

Xiangjun Rong

0 件の賞賛
返信