OSA_TimeDelay within interrupt

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

OSA_TimeDelay within interrupt

639 次查看
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

标签 (1)
0 项奖励
3 回复数

415 次查看
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 项奖励

416 次查看
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 项奖励

416 次查看
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 项奖励