2021-01-29 01:13 AM
Hi,
I am writing an application with STM32F746g Discovery board where i need to get the data from the RMCS-220X based Encoder DC Servo Motor with I2C interface.
I have written the driver code based on the Arduino Library. Arduino code is working perfectly while reading /writing the data from the Motor with I2C bus.
With the modified code based on HAL Libraries, I am able to write the data to the motor but unable to read the data from Motor because execution always stuck at "while(HAL_I2C_Master_Receive(&hi2c1, I2C_ADDRESS, data, 2, 1000) != HAL_OK);" this line.
Board: STM32F746G Discovery
CubeF7 Firmware Version: 1.16.0
I2C Clock: 100KHz
Could you please let me know how to proceed and needful.