Hello!
I'm using FXLC95000 and several sensors with ISF1 (CodeWarrior) and customised example project AccelMag_Project. Everything works perfect. In my source I make setup of settings for accelerometer:
isf_status_t app_fxlc95000_int(void)
{
isf_status_t status;
gFxcl95000AccelProxy.regConfig.ctrl.reg = 0;
gFxcl95000AccelProxy.regConfig.settings.nSettingsToUse = SM_GIVEN_SETTINGS;
gFxcl95000AccelProxy.regConfig.settings.nFifoDepth = 1;
gFxcl95000AccelProxy.regConfig.settings.nCurrentReportRate = 10000;
gFxcl95000AccelProxy.regConfig.settings.nCurrentResolution = AFE_ACCEL_RESOLUTION_16_BIT;
gFxcl95000AccelProxy.regConfig.settings.nRange = AFE_ACCEL_G_RANGE_8G;
status = (isf_status_t)_lwsem_create(&gFxcl95000AccelProxy.lock, 1);
return status;
}
And it works! But now I have issue to change some settings from my MCU host during my device is working. For example I want to set nRange = AFE_ACCEL_G_RANGE_2G.
I send command to FXLC95000:
0x02 (APP_ID_FXLC95000_ACCEL) 0x02 (CI_CMD_WRITE_CONFIG) 0x08 (FXLC95000_ACCEL_APP_RANGE) 0x01 (count of bytes) 0x40 (AFE_ACCEL_G_RANGE_2G)
Than I get answer
0x02 0x80
As I understand It meens that everything is OK!
Then I try to read settings with command:
0x02 (APP_ID_FXLC95000_ACCEL) 0x01 (CI_CMD_READ_CONFIG) 0x00 (offset) 0x0A (count of bytes)
and I get answer:
0x02 0x80 0x0A 0x0A 0x03 0x02 0x01 0x00 0x00 0x27 0x10 0x00 0x40 0x00
As I understand there are my new settings inside FXLC95000.
But then I read data from accelerometer I still get data with range AFE_ACCEL_G_RANGE_8G!!!!! So new settings of nRange doesn't have effect!!!
My question is:
How to change any settings during sensor is working and get effect immediately? Maybe I should send some special command to work with new settings?