I am woking on NHS3100 and I added an accelerometer sensor LIS3DH.
I added my sensor test code based on "app_example_dp_i2c" from the NHS3100 SDK "release_mra2_10_1_nhs3100.zip".
Now I can read/write the register of the sensor by calling the I2C API funciton "Chip_I2C_MasterCmdRead"/"Chip_I2C_MasterSend" respectively.
But the problem I met is that I canNOT operate the I2C by calling the API functions above repeatedly.
My test items/steps are:
1. send data to I2C slave to get the register data of the sensor by call "Chip_I2C_MasterCmdRead";
2. send data to I2C slave to write the register of the sensor by call "Chip_I2C_MasterSend";
3. send data to I2C slave to get the register data of the sensor again by call "Chip_I2C_MasterCmdRead";
If I just have only item 1 (or 2, or 3) to test, it is ok for the correct operation and result.
But when I have the three items to test together, it is failed to operate the item 2 and item 3 for the results.
The API function never return for item 2 and item 3.
And here are the code snippets: