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
Solved! Go to Solution.
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?
I had the same problem and solved it:
// before call vTaskStartScheduler(), excute:
INT_SYS_SetPriority(LPI2C0_Master_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
May you provide me with the recommended connection with the slave?
Regards.
yes, could be the case, thank you so much @VaneB .
LPI2C_DRV_MasterSendDataBlocking().
note that it worked 2 times but then stopped and kept stuck in the function mentioned above
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?
Hi @DemaQasem
It is getting stuck on LPI2C_DRV_MasterSendDataBlocking() or LPI2C_DRV_MasterReceiveDataBlocking?
B.R.
VaneB