Project stuck at OSIF_SemaWait

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

Project stuck at OSIF_SemaWait

跳至解决方案
1,456 次查看
DemaQasem
Contributor II

Hello, I am currently working on retrieving data from a sensor using I2C, I tried to run an example project "i2c_master_s32k144" from S32K1 SDK RTM v4.0.3, but when debugging the project, it was stuck in  "OSIF_SemaWait" function.  how to know the reason behind this ? thank you, Dema

0 项奖励
1 解答
1,345 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

As it is a loop in the semaphore the problem could be in the connection with the slave. 

Could you verify if the same problem happened if you do not have the slave connected?

 

在原帖中查看解决方案

0 项奖励
7 回复数
272 次查看
alfaaa
Contributor I

I had the same problem and solved it:

 

// before call vTaskStartScheduler(), excute:
INT_SYS_SetPriority(LPI2C0_Master_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);

 

标记 (4)
0 项奖励
1,251 次查看
DemaQasem
Contributor II

May you provide me with the recommended connection with the slave?

Regards.

0 项奖励
1,202 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

Take a look at the I2C-bus specification and user manual. It will be helpful for you.

 

0 项奖励
1,280 次查看
DemaQasem
Contributor II

yes, could be the case, thank you so much  @VaneB .

0 项奖励
1,378 次查看
DemaQasem
Contributor II

LPI2C_DRV_MasterSendDataBlocking().

 

note that it worked 2 times but then stopped and kept stuck in the function mentioned above

Screenshot 2023-06-06 102142.png

0 项奖励
1,346 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

As it is a loop in the semaphore the problem could be in the connection with the slave. 

Could you verify if the same problem happened if you do not have the slave connected?

 

0 项奖励
1,417 次查看
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

It is getting stuck on LPI2C_DRV_MasterSendDataBlocking() or LPI2C_DRV_MasterReceiveDataBlocking?

 

B.R.

VaneB

0 项奖励