Other Parts Discussed in Thread: HALCOGEN
Hi,
I am using RM46x Launchpad for development. We are interfacing Input Output expander as a slave device to RM46x, I am facing some issues in writing data bytes to slave device.
I have configured I2C using Halcogen API.
Halcogen Settings:
Global config- Enabled Master Mode
Add Mode- 7Bit_ AMODE
Tx/Rx- Transmitter
Bit Count- 8
Data Count- 12
I2C Clock:
Baud Rate- 100
I2C port- Pullups enabled
PINMUX:
Enabled I2C port
Driver Enable:
I2C driver enabled
Below is the I2C Transmitter part code:
// Master Transfer Functionality //
///////////////////////////////////////////////////////////////
* Mode = Master - Transmitter
* baud rate = 100KHz
* Count = 10
* Bit Count = 8bit
*/
/* Configure address of Slave to talk to */
i2cSetSlaveAdd(i2cREG1, 0x80);
/* Note: Optional - It is done in Init */
i2cSetDirection(i2cREG1, I2C_TRANSMITTER);
i2cSetMode(i2cREG1, I2C_MASTER);
i2cSetStop(i2cREG1);
i2cSendByte(i2cREG1, 0x00);
i2cSendByte(i2cREG1, 0x00);
continued...………...
Problem:
1. After sending 1st Command Byte, The I2CDXR value is copying to I2CDRR register and data remains remains in DRR register.
Loop back is disabled but I2CSTR-> AAS=1
I2C MDR: 0E20
2.I am unable to send more than 4 bytes of command/data, As soon as count reaches 4, unable to write further bytes.
After writing 4 Bytes: I2C Status Register (I2CSTR): value= 1E08, & it stop sending data
Currently I don't have logic Analyser or Oscilloscope to check with waveforms.
Kindly guide me further
Any suggestions will be highly appreciated
Thanks
Regards,
Vishwas