Hi~
Good to see you.
I'm trying to wirte and read from MPU-6050(Invensense) over the I2C1 of the TMS570LS3137.
I configured the I2C driver with HALCoGen (version 3.03.00) in master mode, address size = 7 bits, count = 8 bits and baud rate = 100 kHz.
When I Wirte a byte from MCU to MPU6050, it's OK.
But I read from MPU6050 device, I don't know How to make re-Start Signal and NACK Signal.
Follow is I2c protocol of MPU6050.
Follow is My code. Plz tell me what is problem.
// Set ACK
i2cREG1->MDR &= 0x7FFF;
// Set Tranmitter
i2cREG1->MDR |= I2C_TRANSMITTER;
// Set Slave Addr
i2cSetSlaveAdd(i2cREG1, ID_MPU6050);
// Set Read reg. address
i2cREG1->DXR = (uint32)addr;
// Generate Start signal
i2cSetStart(i2cREG1);
When I executed these codes, I see the second ACK signal from MPU6050 via osilloscope.( SCL signal is set LOW)
How to make second start signal without STOP signal?
How to change configuration for recieve datafrom MPU6050?
How to make NACK signal from MCU to MPU6050?
Plz, Help me.
