Forum Discussion
Inematov
New Contributor
6 years agoHi Anand
Oh i found the wiring issue... (unbelivable :( )
However, now i`m back at my initial problem, that the slave sends me some data that i am not expecting.
In the attachment is an oscilloscope picture, communication via NIOS2. The Slave sends me wrong data, but i a don`t know why and how i can control that from NIOS. (An osci picture from an working communication via arduino is in my first post)
I thought it is a missing initialization step but i can`t find any difference to the examples from Bosch.
alt_u32 txbuffer[0x200];
alt_u32 rxbuffer[0x200];
txbuffer[0] = 0xFA; //MSB
txbuffer[1] = 0xFB; //LSB
txbuffer[2] = 0xFC; //XLSB
while (1)
{
status = alt_avalon_i2c_master_tx_rx(i2c_dev, txbuffer, 1, rxbuffer, 3, ALT_AVALON_I2C_NO_INTERRUPTS);
usleep(1000000);
}