I'm sorry if this is the wrong forum, but I could not find one designated specifically for the CSR8670.
I am attempting to connect an IMU sensor (the MPU6050 on a GY-521 breakout board) to the CSR8670 on a BC127 discovery board. Using the PSTool application in the ADK4.0.1 package, I set the PSKEYs I2C_SCL_PIO to 0x0007 and I2C_SDA_PIO to 0x0006. With an oscilloscope, I can see activity on both lines at three different voltage levels (0, ~1.8, and 3.3V). When I attempt to write or read from the device registers, it fails. Here are some excerpts from the code:
#define I2C_DEVICE_ADDRESS 0x68 //presumably, this is supposed to be the i2c address on the MPU6050
#define I2C_A_DEVICE_REGISTER 0x6B //this is the power management register, used to wake the device from sleep
uint8 data = 0;
i2c_data = I2C_A_DEVICE_REGISTER;
i2c_data = data;
PanicZero(I2cTransfer(I2C_DEVICE_ADDRESS, i2c_data, 2, NULL, 0)); //this is where the error occurs - I2cTransfer returns 0, which means that 0 bytes were successfully transferred
The exact error message printed to the console is "VM has panicked! Reason: Pointer is NULL (Context: 0x0)."
What am I doing wrong with regard to setup? Other than setting the PS Keys, are there any prerequisites for using the PIO pins for I2C?