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
4,086 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
Reply
1 Solution
3,975 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
Reply
7 Replies
2,902 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
Reply
3,881 Views
DemaQasem
Contributor II

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

Regards.

0 Kudos
Reply
3,832 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
Reply
3,910 Views
DemaQasem
Contributor II

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

0 Kudos
Reply
4,008 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
Reply
3,976 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
Reply
4,047 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
Reply