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

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

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

1,972 次查看
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,415 次查看
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 项奖励
回复