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
driver/at86rf215: add functions to configure trim & clock output at run-time #15120
Conversation
9836a8a
to
695681f
Compare
e8bcb36
to
0b0b816
Compare
rebased to solve the merge conflict |
0b0b816
to
d16f506
Compare
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.
And again, I forget to submit a review. Let's see if the comments are still valid
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.
Some comments for the test
597f67c
to
cda2b93
Compare
@benpicco: Code looks good to me. I cannot test this with my hardware, as
Maybe you could give the test another spin after squashing and document your result here? |
cda2b93
to
0d57343
Compare
|
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.
ACK. @jia200x, any objections to merging?
Add a function to retrieve a netdev from the list of interfaces.
To calibrate the at86rf215 radio, trim value has to be set at run-time during board production. Add two helper functions to control the trim value and clock output register.
0d57343
to
be10d0b
Compare
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.
my ACK remains valid
I'm fine with it! My only comment is that I think we should resolve in the mid term how to access device specific stuff + how to represent a device within the OS. Accessing the device descriptor directly when there are network interfaces on top seems to be sensible, since changing any internal state might affect what the network interface/stack expects from the radio. IMO this should be done through a generic |
Contribution description
To calibrate the at86rf215 radio, trim value has to be set at run-time during board production.
Add two helper functions to control the trim value and clock output register.
This also adds a
gnrc_netif_get_netdev()
netdev function to get a pointer to a previously registered netdev from netif.Testing procedure
tests/driver_at86rf215
has gained three new functions:set_trim
set the trim valueset_clko
enable clock outputget_random
get numbers from the radio's random number generator (previously untested)If you connect a frequency counter to the clock output pin, you should be able to measure the set frequency and see it change when adjusting the trim value.
Issues/PRs references