Skip to content

Conversation

@pabigot
Copy link
Contributor

@pabigot pabigot commented Oct 16, 2019

The sample program did nothing by default because no triggers were configured.

By inspection the driver mis-ordered some initialization code, and mis-configured a register. It is unclear to me why it worked before, since the power-up reset value of the register is to not enable interrupts.

Tested on frdm_k64f and nucleo_l476rg with x_nucleo_iks01a2 shield.

This sensor defaults to no trigger, in which case no observations will
be read from the device.  Set to use the work queue (global) trigger.

Signed-off-by: Peter Bigot <[email protected]>
The function that initializes interrupts configures the sensor
register to enable interrupts.  It is called before the function that
resets the sensor.  Swap the order.

Also correct the mask argument to the configuration command, and use
the BIT() macro to construct the set argument.

Signed-off-by: Peter Bigot <[email protected]>
@avisconti
Copy link
Contributor

@pabigot
How did you test it? Can you add some info in the description?

@pabigot
Copy link
Contributor Author

pabigot commented Oct 17, 2019

How did you test it? Can you add some info in the description?
Updated description.

Copy link
Contributor

@avisconti avisconti left a comment

Choose a reason for hiding this comment

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

LGTM

@avisconti avisconti requested a review from MaureenHelm October 17, 2019 10:51
@MaureenHelm MaureenHelm merged commit 9e473f9 into zephyrproject-rtos:master Oct 17, 2019
@pabigot pabigot deleted the pr/20191016b branch October 19, 2019 12:54
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.

4 participants