# Highpass filter on latest firmware(lis2dh12)

**URL:** <https://f.ruuvi.com/t/highpass-filter-on-latest-firmware-lis2dh12/3823>\
**Category:** 🇬🇧 Ruuvi firmware development\
**Created:** [8 November 2019 13:50 UTC](https://f.ruuvi.com/t/highpass-filter-on-latest-firmware-lis2dh12/3823 "2019-11-08T13:50:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![theBASTI0N](https://f.ruuvi.com/letter_avatar_proxy/v4/letter/t/ba8739/32.png) [@theBASTI0N](https://f.ruuvi.com/u/theBASTI0N)\
**Post date:** [8 November 2019 13:50 UTC](https://f.ruuvi.com/t/highpass-filter-on-latest-firmware-lis2dh12/3823/1 "2019-11-08T13:50:01Z")

</div>

Hey,

Does the latest firmware (v2.5.9) support high pass filtering on the lis2dh12. I use to be able to enable it by calling:  
lis2dh12\_set\_highpass(true);  
But this seems to be removed from the latest driver.

Any information on this would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![otso](https://f.ruuvi.com/user_avatar/f.ruuvi.com/otso/32/1651_2.png) [@otso](https://f.ruuvi.com/u/otso)\
**Post date:** [8 November 2019 14:19 UTC](https://f.ruuvi.com/t/highpass-filter-on-latest-firmware-lis2dh12/3823/2 "2019-11-08T14:19:34Z")

</div>

It was probably removed while working on movement counter, as the movement counter uses high pass on the interrupts but not on data.

The original function seems to have been:

```auto
lis2dh12_ret_t lis2dh12_set_highpass(uint8_t highpass)
{
    uint8_t ctrl[1];
    ctrl[0] = highpass;
    return lis2dh12_write_register(LIS2DH12_CTRL_REG2, ctrl, 1);
}

```

where highpass is the control register 2 value.

 ![image](https://f.ruuvi.com/uploads/default/original/2X/6/6d8a0b46f1fd348992f7779b9dc8e3750f0ada69.png)  
You’d probably want to make a function to read the LIS2DH12\_CTRL\_REG2, set bit 0x08 (FDS) in the read value and write the register value with high pass bit set to the LIS2DH12
