Project stuck at OSIF_SemaWait

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Project stuck at OSIF_SemaWait

ソリューションへジャンプ
1,328件の閲覧回数
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,217件の閲覧回数
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 返答(返信)
144件の閲覧回数
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,123件の閲覧回数
DemaQasem
Contributor II

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

Regards.

0 件の賞賛
1,074件の閲覧回数
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,152件の閲覧回数
DemaQasem
Contributor II

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

0 件の賞賛
1,250件の閲覧回数
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,218件の閲覧回数
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,289件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

It is getting stuck on LPI2C_DRV_MasterSendDataBlocking() or LPI2C_DRV_MasterReceiveDataBlocking?

 

B.R.

VaneB

0 件の賞賛