Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Dec 21, 2019

The frdm_k64f devicetree overlay specified the wrong (probably) I2C bus, device address, and pin for the alert signal. Fix that.

Add an overlay for the nrf52_pca10040.

Update the sample so that it can be used for testing triggered alerts.

FWIW: As far as I can tell the alert infrastructure does not work correctly: the sensor seems to never indicate an out-of-window temperature, whether in the status register or through the INTn or CTn signals. The MCU-side trigger detection has been tested with manual jiggling of the signal level.

Copy link
Contributor

Choose a reason for hiding this comment

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

change to:

... a |plusminus| 1 |deg| C window ...

@stephanosio stephanosio closed this Jan 2, 2020
@stephanosio stephanosio reopened this Jan 2, 2020
@zephyrbot zephyrbot added the area: Samples Samples label Jan 2, 2020
The device address can only be 0x48 through 0x1B.  C6 is connected to
the FXOS870 and is not exposed on a header: switch to Arduino D0.

Move this to a boards subdirectory so we can add other overlays
without cluttering the root.

Signed-off-by: Peter Bigot <[email protected]>
Expand the set of hardware this can be tested with.

Signed-off-by: Peter Bigot <[email protected]>
When a trigger was enabled the original implementation would do
nothing more than print "Waiting for a threshold event", without
describing what such an event would look like.

Rework to maintain a window of +/- 0.5 Cel around the most recent
in-window temperature, and reset that window whenever a trigger occurs
or a non-trigger reading is outside the window.  Time-out and display
the temperature if no event occurs in a reasonable time.

Signed-off-by: Peter Bigot <[email protected]>
reg = <0x48>;
label = "ADT7420";
int-gpios = <&gpioc 6 0>;
int-gpios = <&gpioc 16 0>;
Copy link
Member

Choose a reason for hiding this comment

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

Let's replace with <&arduino_header 6 0> /* D0 */.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense, but this propagated from the original conversion to devicetree, and isn't specific to this sample: there are at least twelve samples that bypass the Ardunio alias and nexus map for this platform, probably more that do it for other platforms.

Can we do this in a separate PR that fixes it for all samples at once, after the dust settles on topic-gpio and it won't create conflicts?

Copy link
Member

Choose a reason for hiding this comment

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

Sure

*/

&i2c1 {
&i2c0 {
Copy link
Member

Choose a reason for hiding this comment

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

Let's replace with arduino_i2c

compatible = "adi,adt7420";
reg = <0x48>;
label = "ADT7420";
int-gpios = <&gpio0 11 0>;
Copy link
Member

Choose a reason for hiding this comment

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

Use arduino here too

@carlescufi carlescufi merged commit ff5cadc into zephyrproject-rtos:master Jan 8, 2020
@pabigot pabigot deleted the nordic/20191221b branch January 16, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants