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/feather-nrf52840-sense: use generic lsm6dsxx #20526

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

MrKevinWeiss
Copy link
Contributor

Contribution description

This will help handle multiple board variants such as rev B and C.

Testing procedure

Test on both variants with SAUL.

I ran on both the blue and black boards:

$ BOARD=feather-nrf52840-sense make -C examples/saul flash-only term
make: Entering directory '/home/weiss/repos/RIOT/examples/saul'
stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
sleep 3
[INFO] uf2conv.py not found - fetching it from GitHub now
CC= CFLAGS= make -C /home/weiss/repos/RIOT/dist/tools/uf2
[INFO] uf2conv.py successfully fetched!
/home/weiss/repos/RIOT/dist/tools/uf2/uf2conv.py -f 0xADA52840 /home/weiss/repos/RIOT/examples/saul/bin/feather-nrf52840-sense/saul_example.hex --base 0x1000
Converted to uf2, output size: 66560, start address: 0x1000
Flashing /media/weiss/FTHRSNSBOOT (nRF52840-Feather-Sense)
Wrote 66560 bytes to /media/weiss/FTHRSNSBOOT/NEW.UF2
sleep 2
/home/weiss/repos/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2024-04-02 11:19:13,689 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
2024-04-02 11:19:14,695 # ersion: 2024.04-devel-589-g99daa-pr/feathersaul)
2024-04-02 11:19:14,696 # Welcome to RIOT!
2024-04-02 11:19:14,697 # 
2024-04-02 11:19:14,699 # Type `help` for help, type `saul` to see all SAUL devices
2024-04-02 11:19:14,700 # 
> saul read 12
2024-04-02 11:19:16,471 # saul read 12
2024-04-02 11:19:16,474 # Reading from #12 (lsm6dsxx|SENSE_TEMP)
2024-04-02 11:19:16,475 # Data:           19.62 °C
> 2024-04-02 11:19:18,190 # Exiting Pyterm
make: *** [/home/weiss/repos/RIOT/examples/saul/../../Makefile.include:873: term] Interrupt

weiss@mobiweiss:~/repos/RIOT$ BOARD=feather-nrf52840-sense make -C examples/saul flash-only term
make: Entering directory '/home/weiss/repos/RIOT/examples/saul'
stty -F /dev/ttyACM0 raw ispeed 1200 ospeed 1200 cs8 -cstopb ignpar eol 255 eof 255
sleep 3
[INFO] uf2conv.py not found - fetching it from GitHub now
CC= CFLAGS= make -C /home/weiss/repos/RIOT/dist/tools/uf2
[INFO] uf2conv.py successfully fetched!
/home/weiss/repos/RIOT/dist/tools/uf2/uf2conv.py -f 0xADA52840 /home/weiss/repos/RIOT/examples/saul/bin/feather-nrf52840-sense/saul_example.hex --base 0x1000
Converted to uf2, output size: 66560, start address: 0x1000
Flashing /media/weiss/FTHRSNSBOOT (nRF52840-Feather-Sense)
Wrote 66560 bytes to /media/weiss/FTHRSNSBOOT/NEW.UF2
sleep 2
/home/weiss/repos/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyACM0" -b "115200"  
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2024-04-02 11:19:32,438 # Connect to serial port /dev/ttyACM0
^[[AWelcome to pyterm!
Type '/exit' to exit.
saul read 122024-04-02 11:19:33,443 # ersion: 2024.04-devel-589-g99daa-pr/feathersaul)
2024-04-02 11:19:33,444 # Welcome to RIOT!
2024-04-02 11:19:33,444 # 
2024-04-02 11:19:33,446 # Type `help` for help, type `saul` to see all SAUL devices
2024-04-02 11:19:33,447 # 
saul read 12
2024-04-02 11:19:37,639 # saul read 12
2024-04-02 11:19:37,642 # Reading from #12 (lsm6dsxx|SENSE_TEMP)
2024-04-02 11:19:37,643 # Data:           19.79 °C

Issues/PRs references

Follow-up of #20504

This will help handle multiple board variants such as rev B and C.
@MrKevinWeiss MrKevinWeiss requested a review from mguetschow April 2, 2024 09:20
@github-actions github-actions bot added the Area: boards Area: Board ports label Apr 2, 2024
Copy link
Contributor

@mguetschow mguetschow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM! Successfully tested on a rev B feather sense.

Did you also encounter a 5-degree offset between the temperature reported by the dedicated temp sensor (sht3x1) and lsm6dsxx? Definitely within the +/- 15 degrees offset that was indicated in the datasheet, but still surprising at normal room temperature... 🤔

> saul read all
(...)
2024-04-02 11:32:44,184 # Reading from #12 (lsm6dsxx|SENSE_TEMP)
2024-04-02 11:32:44,185 # Data:           13.93 °C
2024-04-02 11:32:44,185 # 
2024-04-02 11:32:44,186 # Reading from #13 (sht3x1|SENSE_TEMP)
2024-04-02 11:32:44,186 # Data:           19.33 °C

@mguetschow
Copy link
Contributor

Oh, and for further reference:

2024-04-02 11:36:07,314 # Reading from #3 (NRF_TEMP|SENSE_TEMP)
2024-04-02 11:36:07,315 # Data:           16.50 °C
2024-04-02 11:36:07,323 # Reading from #7 (bmp280|SENSE_TEMP)
2024-04-02 11:36:07,323 # Data:           19.68 °C

@mguetschow mguetschow added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 2, 2024
@riot-ci
Copy link

riot-ci commented Apr 2, 2024

Murdock results

✔️ PASSED

99daaec boards/feather-nrf52840-sense: use generic lsm6dsxx

Success Failures Total Runtime
564 0 564 04m:03s

Artifacts

@MrKevinWeiss
Copy link
Contributor Author

It wasn't soo bad for me the lsm6dsxx was the same for both types of boards (around 21) but the bmp was 24 or so... Better than getting an initialize error I suppose.

@MrKevinWeiss MrKevinWeiss added this pull request to the merge queue Apr 2, 2024
Merged via the queue into RIOT-OS:master with commit a9b9569 Apr 2, 2024
27 checks passed
@MrKevinWeiss MrKevinWeiss deleted the pr/feathersaul branch April 2, 2024 11:19
@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants