The nature of blocking in the case of I2C_DRV_MasterSendDataBlocking() for KSDK and MQX

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

The nature of blocking in the case of I2C_DRV_MasterSendDataBlocking() for KSDK and MQX

Jump to solution
664 Views
davepfaltzgraff
Senior Contributor I

I'm exploring the I2C with RTOS example found at C:\Freescale\KSDK_1.2.0\examples\frdmk22f\demo_apps\i2c_rtos\i2c_rtos_mqx\kds and noted the use of the I2C_DRV_MasterSendDataBlocking() function.

 

When it's being used in MQX like this am I understanding it right that only the task calling this function is blocked and the remaining MQX tasks will continue to run?

 

Thanks

Labels (1)
0 Kudos
1 Solution
448 Views
adriancano
NXP Employee
NXP Employee

Hi David,

Your understanding is right. In some part in the I2C_DRV_MasterSendDataBlocking() a OSA_SemaWait functions is called. You can check the next i2c wait functions:

i2cwait.jpg

therefore waiting for a semaphore to be posted by another event or task will cause a wait in the current task allowing other tasks be handled by the Operating System meanwhile.


Hope this information can help you

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

View solution in original post

2 Replies
449 Views
adriancano
NXP Employee
NXP Employee

Hi David,

Your understanding is right. In some part in the I2C_DRV_MasterSendDataBlocking() a OSA_SemaWait functions is called. You can check the next i2c wait functions:

i2cwait.jpg

therefore waiting for a semaphore to be posted by another event or task will cause a wait in the current task allowing other tasks be handled by the Operating System meanwhile.


Hope this information can help you

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

448 Views
davepfaltzgraff
Senior Contributor I

Hi Adrian,

That's what I was hoping!

Thanks for the quick response.

Dave

0 Kudos