boards/thingy52: add dependency for on-board hts221/lps22hb sensors#10793
boards/thingy52: add dependency for on-board hts221/lps22hb sensors#10793MrKevinWeiss merged 4 commits intoRIOT-OS:masterfrom
Conversation
|
I will test this tomorrow |
|
Maybe @haukepetersen could test this PR on its Thingy52 ? |
4c5c9ab to
5f263d4
Compare
@maribu did you? |
|
Sadly not. I wanted to borrow my colleague's Thingy:52 for testing another PR and this one, but the Thingy:52 went missing. I only put this information in the other PR and forgot about this one. |
|
We have a lot of these Thingy52. If somebody needs one, I probably can give a few to you. I just have to ask my boss first. (I don't think that will be a big problem) So, ping me, if you need one :) |
|
The hts221 should automaticlly be found when I use saul_default, right? |
|
Thanks for having a look @Citrullin !
Yes, that's the idea. The |
|
I cannot get an ack from the hts221, I tried 0x5F address and it doesn't work... The 0x19 address works though which is weird since it should be connected to I2C_DEV 1 not 0... |
|
Thanks for testing @MrKevinWeiss! I'll have another look when time permits and will try to update. |
|
I can also return to it (when time permits as well), I tried a bit but couldn't get it going. |
5f263d4 to
621c350
Compare
|
Now that #12290 was merged (with the same I2C configuration provided by this PR...), I rebased and also added support for lps22hb (that was merged in the meantime as well). I also found why @MrKevinWeiss couldn't make it work. Will open a PR now. The bug is pretty awesome. |
|
Ya it still seems like the I2C itself is having some problems. I cannot even use the i2c_scan command... |
|
There might be other problems then. I already fixed another one with lps22hb: the address was not correct. |
|
Hmm ya. With the two PRs I get lockup on i2c dev 0 and can read and scan on address 0x19 on i2c dev 1. With master both 1 and 0 behave like one (which is incorrect). I don't know why the terminal locks up on i2c dev 0 though... |
|
I would use |
Can you try to initialize and set this pin high in board init ? |
e70f2ac to
0b0468d
Compare
|
Yup it seems to have fix it. So adding void board_init(void)
{
gpio_init(GPIO_PIN(0, 30), GPIO_OUT);
gpio_set(GPIO_PIN(0, 30));
/* initialize the CPU */
cpu_init();
}to both the #12372 and this PR then using the i2c_scan command on i2c_dev 0, no longer freezes the terminal but gives the following output. I still don't understand why the terminal is frozen. Maybe it could be that the i2c pins are actually held down and it is waiting on a flag or something. If the sda and scl pins were high impedance I would expect them to just return an error code. |
0b0468d to
7b33599
Compare
|
@MrKevinWeiss, I rebased on latest master and added the management of VDD pin in |
3981f4c to
c5664b7
Compare
|
I am out of office until Monday. Maybe ping @leandrolanzieri or @jia200x. |
|
Well it seems to work now however the temperatures and humidity seem off... also on the saul example I don't know if getting the correct values is out of scope of this PR or not... It isn't that cold in the office. |
|
Does the lps22hb driver work ? |
|
Yup, that seems OK |
|
If you want this in I would just raise an issue for the HTS221. I or @JannesVolkens can look into it later. |
|
Looking at the datasheet it may also be improperly calibrated... I would need further investigation but the more I look into this the more I think this is out of scope with the PR. Any objections @aabadie ? |
Please ACK :) |
MrKevinWeiss
left a comment
There was a problem hiding this comment.
ACK.
I will raise the issue for the sensor.
Contribution description
This PR provides a default I2C configuration for the nrf52 Thingy52 and add hts221 sensor as dependency when saul is used. lps22hb could also be added when #10695 will be merged. ccs811 requires support for the GPIO expander SX1509.
This PR is untested, I don't have this hardware. Maybe @haukepetersen will be able to test this.
Testing procedure
tests/driver_hts221and verify the output is correct:examples/sauland check the hts221 and lps22hb values:Issues/PRs references
None