Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boards/dwm1001: use lis2dh12_i2c instead of lis2dh12_spi #18857

Merged
merged 1 commit into from
Nov 9, 2022
Merged

boards/dwm1001: use lis2dh12_i2c instead of lis2dh12_spi #18857

merged 1 commit into from
Nov 9, 2022

Conversation

blueted2
Copy link
Contributor

@blueted2 blueted2 commented Nov 9, 2022

Contribution description

Use the i2c version of the lis2df12 driver instead of the spi one for the dwm1001.

When including saul, I get the following error:

[auto_init_saul] error initializing lis2dh12 #0

As I understand it, the lis2df12 is capable of both i2c and spi communication, however I believe with the dwm1001, it is only connected by i2c.

Page 7, 2. DWM1001 MODULE - DWM data sheet

When switching to the i2c implementation, the error disappears, and the previously un-detected sensors now show up (6 and 7):

> saul
saul
ID      Class           Name
#0      ACT_SWITCH      LED0 (Green)
#1      ACT_SWITCH      LED1 (Red)
#2      ACT_SWITCH      LED2 (Red)
#3      ACT_SWITCH      LED3 (Blue)
#4      SENSE_BTN       Button 1 (USER)
#5      SENSE_TEMP      NRF_TEMP
#6      SENSE_ACCEL     lis2dh12
#7      SENSE_TEMP      lis2dh12
> saul read 6
saul read 6
Reading from #6 (lis2dh12|SENSE_ACCEL)
Data:   [0]        -100 mg
        [1]           8 mg
        [2]        -996 mg
> 

@github-actions github-actions bot added Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration labels Nov 9, 2022
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 9, 2022
@riot-ci
Copy link

riot-ci commented Nov 9, 2022

Murdock results

✔️ PASSED

dde641f boards/dwm1001: use lis2dh12_i2c instead of lis2dh12_spi

Success Failures Total Runtime
1999 0 2000 06m:33s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Nov 9, 2022
@benpicco
Copy link
Contributor

benpicco commented Nov 9, 2022

Thank you for the fix!

@benpicco benpicco merged commit 15448bf into RIOT-OS:master Nov 9, 2022
@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants