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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

1,700 Views
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.

Labels (1)
0 Kudos
Reply
1 Reply

1,143 Views
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 Kudos
Reply