Hi,
At our CC2640R2F based product we have a "Test Mode". At "Test Mode" we test peripherals like leds, buzzer, and I2C Accelerometer. After entering "Test Mode" we enter command example "acce" through UART to test our accelerometer. At our "Test Mode" only the TestApp__Accelerometer() fails. If I call this TestApp__Accelerometer() in main TI-RTOS task and not in "Test Mode" it works all the time.
Here are my observations after going to Test Mode.
1. If I call TestApp__Accelerometer() at Test Mode initialization, it passes.
/* Configure UART */
UartApp__Init();
UartApp__WriteString("TEST STARTED\r\n");
TestApp__Accelerometer();
Note: After this UART is set to repeated read callback for accepting commands example "acce".
2. After repeated UART read callback is initialized, it fails TestApp__Accelerometer(), specifically reading the Device Identification Register of the Accelerometer.
status_t LIS3DH_GetWHO_AM_I(uint8_t* val)
{
if(!LIS3DH_ReadReg(LIS3DH_WHO_AM_I_ADDR, val))
{
return MEMS_ERROR;
}
else
{
return MEMS_SUCCESS;
}
}
I debug the TestApp__Accelerometer, specifically the I2C part, and it is able to SENSOR_SELECT() and return I2C handle.
My conclusion is that the UART Repeated Read Callback is affecting the I2C. Shouldn't this be handled by TI-RTOS drivers? What is the proper solution to this problem?
- kel