This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nordic nrfconnect sdk, wrong bit mask in driver for light sensor bh1749

nordic nrfconnect sdk, wrong bit mask in driver for thingy light sensor bh1749

In the nordic nrfconnect sdk there is a bitmask typo causing wrong anction.

The header file https://github.com/nrfconnect/sdk-nrf/blob/master/drivers/sensor/bh1749/bh1749.h

notes:

/* BH1749_SYSTEM_CONTROL */
#define BH1749_SYSTEM_CONTROL_PART_ID_Msk GENMASK(5, 0)
#define BH1749_SYSTEM_CONTROL_PART_ID 0x0D
#define BH1749_SYSTEM_CONTROL_SW_RESET_Msk BIT(6)
#define BH1749_SYSTEM_CONTROL_SW_RESET BIT(6)
#define BH1749_SYSTEM_CONTROL_INT_RESET_Msk BIT(7)

#define BH1749_SYSTEM_CONTROL_INT_RESET BIT(7)

but according to the Datasheet BH1749 www.rohm.com/.../bh1749nuc-product

SW_RESET is Bit 7 and

INT_RESET is Bit 6

Bit should be exchanged.

The bug:

In consequence the command bh1749_sw_reset does not reset the chip, but only the INT status.

please fix this bug in SDK.

regards, Adib.

--

Related