Problem with my lis3lv02dq

Hello everybody,
I have a problem with my sensor lis3lv02dq.
I want to do a function that when you press a button, set to 0 the values of the 3-axis sensor to start from a point of reference.
I'm playing with several values in CTRL_REG2, but I can not reset using the boot.

I leave part of the code of my accelerometer

void Sensor_Init(void)
{
unsigned int xx = 0;
unsigned int yy = 0;
unsigned int zz = 0;
 xx= Sensor_RX(WHO_AM_I);
 yy= Sensor_RX(CTRL_REG1);
 zz= Sensor_RX(CTRL_REG3);
 printf(" W: %x 1: %x  2: %x \n", xx, yy, zz);


 // war: Sensor_TX(CTRL_REG1, 0x87); // Power on device, enable all axis, and turn off self test
 // war: Sensor_TX(CTRL_REG2, 0x45);

 //Axel: REG2: 0x65, REG1: 0x47
//Sensor_TX(CTRL_REG2, 0x14);
Sensor_TX(CTRL_REG2, 0x44);
Sensor_TX(CTRL_REG1, 0x87);

   if ((B1) == 0 && b1_flag == 0)          //if B1 pressed
     {
       draw_array32_to_lcd("Calibrate  ");
       
       b1_flag = 1;
     }
   if ((B1) != 0 && b1_flag != 0)          //if B1 released
     {
       Sensor_TX(CTRL_REG2, 0x14);
       b1_flag = 0;
     }

}

Do you have a website or URL that points to the datasheet of the sensor, that would be a great help.
Furthermore posting the whole code helps also, please use the # butto so the code appears between the [ code] and [/code] tags

but I can not reset using the boot

What does that mean?

As well as your code, it would be useful to see your debug print output.

The datasheet is this:
http://symbrion.org/tiki-download_file.php?fileId=225

Thks

You say you are trying to set the values to zero somehow - yet your code seems to simply reboot the chip.

So what exactly are you trying to do and what makes you think its not happening?

My idea is, when you press B1, display counters are in 0 to start measuring from a reference point.
It is a very simple idea, but I can not.
My problem is, when I press B1, don´t get to set 0