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
Add support for TMAG5170 3d Hall effect sensor #61346
Merged
carlescufi
merged 2 commits into
zephyrproject-rtos:main
from
morsisko:tmag5170_working
Sep 26, 2023
Merged
Add support for TMAG5170 3d Hall effect sensor #61346
carlescufi
merged 2 commits into
zephyrproject-rtos:main
from
morsisko:tmag5170_working
Sep 26, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
morsisko
requested review from
nashif,
dcpleung,
andyross,
carlescufi,
galak and
MaureenHelm
as code owners
August 9, 2023 20:39
zephyrbot
added
area: Devicetree Binding
PR modifies or adds a Device Tree binding
area: Base OS
Base OS Library (lib/os)
platform: TI SimpleLink
Texas Instruments SimpleLink MCU
area: Sensors
Sensors
labels
Aug 9, 2023
zephyrbot
requested review from
avisconti,
cfriedt,
teburd,
tristan-google,
vaishnavachath,
vanti and
yperess
August 9, 2023 20:40
morsisko
force-pushed
the
tmag5170_working
branch
from
August 9, 2023 21:36
5ba2231
to
c580bec
Compare
I would be thankful for a hint on how to resolve the unit tests issues. Did I forgot to add the sensor somewhere? The device tree error is unclear to me |
morsisko
force-pushed
the
tmag5170_working
branch
2 times, most recently
from
August 15, 2023 17:49
927948c
to
0b46a19
Compare
MaureenHelm
previously approved these changes
Sep 21, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thank you. Please rebase and resolve the merge conflict
Add two new functions: crc4 for generic calculations of CRC4, and crc4_ti which use look-up table for faster calculations of CRC4 algortihms that base on 0x03 polynomial. Signed-off-by: Michal Morsisko <morsisko@gmail.com>
Introduce support for Texas Instruments TMAG5170 high-precision linear 3D Hall-effect SPI sensor. This driver allows to configure measurements on magnetic and temperature channels. It is also possible to read rotation of the magnet. Signed-off-by: Michal Morsisko <morsisko@gmail.com>
morsisko
force-pushed
the
tmag5170_working
branch
from
September 24, 2023 00:59
0b46a19
to
237ae0d
Compare
Conflicts has been resolved, PR is now rebased |
MaureenHelm
approved these changes
Sep 25, 2023
vaishnavachath
approved these changes
Sep 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area: Base OS
Base OS Library (lib/os)
area: Devicetree Binding
PR modifies or adds a Device Tree binding
area: Sensors
Sensors
platform: TI SimpleLink
Texas Instruments SimpleLink MCU
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
this pull request adds support for Texas Instruments' TMAG5170 high-precision, linear 3D Hall-effect sensor with SPI bus interface.
For now following features are implemented:
Most of the configuration is done via devicetree and not Kconfig, this is because in my opinion this gives the end user more flexibility, as they can connect multiple TMAGs with different settings (for example one sensor with fast sampling, another one for slow and redundancy)
Also I'm not sure about the CRC. As for now Zephyr is missing CRC4, I've added two CRC4 algorithms. One that is specific to TMAG (crc4_ti) and another one that is generic. They would both work for this sensor, one is just faster. Not sure if I should leave the
crc4_ti
, or stick tocrc4
. Maybe I shouldn't touch the lib/os/crc library, instead implement the crc algorithm directly in the sensor driver code? I'm open for suggestions.