Are I2C_START and I2C_STOP commands included in HAL_I2C_Master_Transmit and HAL_I2C_Master_Receive commands?
I am using HAL_I2C_Master_Transmit and HAL_I2C_Master_Receive commands to read device ID of various sensors. I wrote a simple code to do that. It works for some sensors (e.g. MCP9800, HDC1080). But it doesn't work for some other sensors (e.g MLX90164, MAX30101, MLX90632, AFE4404). Some of these sensors ask for specific I2C_START and I2C_STOP commands. Following is my sample code for MCP9800;
-----------------------------------------------------------------------------------------------------------------------
buffer[0]=0xFE; //Pointer buffer for Manufacturer ID
HAL_I2C_Master_Transmit
(&hi2c1,0x40<<1,buffer,1,100);
HAL_Delay(500);
HAL_I2C_Master_Receive
(&hi2c1,0x40<<1,buffer,2,100);
IDNumber = buffer[0]<<8 | buffer[1]; //combine 2 8-bit into 1 16bit
UU_PutString(USART2, "\r\nManufacturer ID in Decimal for HDC1080 = ");
UU_PutNumber(USART2, IDNumber);
HAL_Delay(500);
--------------------------------------------------------------------------------------------------------------------
What are HAL commands for I2C_START and I2C_STOP? I couldn't find in the HAL manual.
Thanks
Kiran
