Project stuck at OSIF_SemaWait

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

Project stuck at OSIF_SemaWait

Jump to solution
1,529 Views
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 Kudos
1 Solution
1,418 Views
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?

 

View solution in original post

0 Kudos
7 Replies
345 Views
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);

 

0 Kudos
1,324 Views
DemaQasem
Contributor II

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

Regards.

0 Kudos
1,275 Views
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 Kudos
1,353 Views
DemaQasem
Contributor II

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

0 Kudos
1,451 Views
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 Kudos
1,419 Views
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 Kudos
1,490 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @DemaQasem 

It is getting stuck on LPI2C_DRV_MasterSendDataBlocking() or LPI2C_DRV_MasterReceiveDataBlocking?

 

B.R.

VaneB

0 Kudos