Other Parts Discussed in Thread: CC1310
Tool/software: TI-RTOS
Hi,
I am try to right the code for magnetometer using sensor studio. as you know there are 3 axis, ie X, Y, and Z..
code snippet:
i2cStart();
i2cTx(MAG_ADDR | I2C_OP_WRITE);
i2cTx(MAG_DR_STATUS);
if (state.i2cStatus == 0x0000) {
i2cRepeatedStart();
i2cTx(MAG_ADDR | I2C_OP_READ);
i2cRxAck(mag_status);
i2cRxAck(mag_x_msb);
i2cRxNack(mag_x_lsb);
i2cTx(MAG_ADDR | I2C_OP_READ);
i2cRxAck(mag_y_msb);
i2cRxNack(mag_y_lsb);
i2cTx(MAG_ADDR | I2C_OP_READ);
i2cRxAck(mag_z_msb);
i2cRxNack(mag_z_lsb);
}
i2cStop();
output.MagXyzStatus = mag_status;
output.magOut[0] = (mag_x_msb <<8) | mag_x_lsb;
output.magOut[1] = (mag_y_msb <<8) | mag_y_lsb;
//output.magOut[2] = (mag_z_msb <<8) | mag_z_lsb; <<<------- if UN-commented this line then i get above given error " Too many concurrent register variables.conflict involves: mag_y_lsb,mag_z_lsb,mag_z_msb, mag_x_lsb, mag_y_msb,mag_x_msb, mag_status"
// Schedule the next execution
fwScheduleTask(1);
please help to resolve this issue.