Hello Alice_Yang,
I am trying to use CMSIS library and I am trying to write a basic code fusing with two example code which are cmsis_lpi2c_edma_b2b_transfer_master under CMSIS examples and the one you attached. I realized I am checking the busy status in a wrong way.
Instead of
while(!ARM_I2C_EVENT_TRANSFER_DONE)
{}
while(EXAMPLE_I2C_MASTER.GetStatus().busy)
{} I need to check for
while(!g_masterCompletionFlag)
{}which is set upon a completion event. That is used in the CMSIS example of I2C.
One other thing, after calling --.MasterRecieve function I need to wait for busy flag:
EXAMPLE_I2C_MASTER.GetStatus().busy
Well the main point I am struggling is the examples are too complicated for a simple I2C operation. A single write or read operation is declared in 2-3 functions concatenated. I am familiar with assembly language but it become confusing for debugging these high level example codes.
Now I am working on reading sensor data using again CMSIS libraries. I have still some problems but I am working on them
If I feel desperate I will ask for your help again.
Thanks a lot
Onur