OSA_TimeDelay within interrupt

cancel
Showing results for 
Search instead for 
Did you mean: 

OSA_TimeDelay within interrupt

386 Views
cedrickkukela
Contributor III


Okay I'm trying to write project that is as interrupt driven and requires a time delay or two. I am not quite sure though of the behavior of OSA_TimeDelay. Does a block other interrupts or does it only block interrupts with the same or lower priority. Would i be better of using a timer interrupt to handle the time delay. I am new to kinetics and the MKL03 line so all view would be appreciated.

 

Cedrick

Labels (1)
0 Kudos
3 Replies

162 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Cedrik,

this is not recommended, can you please describe the problem you want to solve withe the delay inside the interrupt? We can think of a workaround.

Regards,

Carlos

0 Kudos

163 Views
cedrickkukela
Contributor III

I wanted to have a way to check if i had received a response with in a time limit. I am trying to complete the task using a hardware timer and a queue. What do you think?

Cedrick

0 Kudos

163 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi cedrik,

you can use a lwevent. It is recommended to implement logic such that you can set and clear events inside the interrupt and outside the interrupts execute the actions you need depending whether the event was set or not.

Please check lwevent functions in MQX_Reference_Manual.pdf (C:\Freescale\Freescale_MQX_4_2\doc\mqx)


Regards,
Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos