Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

LIS2DW12: Conversion function bit-shift reliance in self-test example

Open
#184 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
c
Domain
embedded-iot

Research direction

Read lis2dw12_STdC/examples/lis2dw12_self_test.c and trace the data passed to lis2dw12_from_fs4_to_mg. Compare that input with the conversion function's right-aligned expectation described in the issue. Done means the self-test example passes appropriately shifted data to the conversion function.

Written by the indexing model from the issue text.

Description

bug
Device part numbers

LIS2DW12

Describe the bug

This commit as part of v2.3.0 release updated the conversion functions to expect right-aligned (bit shifted right by 2) data whereas up until now it was expecting the 16-bit data as it comes from the chip - as commented here. The examples, in particular the self-test one, has not been updated to right shift the data before calling the lis2dw12_from_fs4_to_mg function.

Dominant language
C
Stars
885
Forks
538
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from STMicroelectronics/STMems_Standard_C_drivers

All issues in STMicroelectronics/STMems_Standard_C_drivers

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.