Skip to content

Conversation

@avisconti
Copy link
Contributor

@avisconti avisconti commented Nov 21, 2019

On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.

This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.

Fixes: #20933

Signed-off-by: Armando Visconti [email protected]

@avisconti avisconti added bug The issue is a bug, or the PR is fixing a bug area: Shields Shields (add-on boards) labels Nov 21, 2019
@avisconti avisconti requested a review from erwango as a code owner November 21, 2019 15:43
@avisconti avisconti self-assigned this Nov 21, 2019
@erwango
Copy link
Member

erwango commented Nov 21, 2019

@avisconti, is that fixing an already known issue ?

@avisconti
Copy link
Contributor Author

@avisconti, is that fixing an already known issue ?

@erwango
Yes, it is a known issue on LSM6DSO and the fact that it is entering I3C hot join state by mistake. This is due to the fact that when INT1 is used as source for DRDY interrupt the '1' is preserved by the level shifter (if any, but on shield3 we have it) and if you press the reset button the INT1 pin is configured as input and the '1' is switching the sensor to hot join state.
Solution prposed by this commit: use INT2 as source of drdy interrrupts, so that int1 remains always to '0'.

@avisconti
Copy link
Contributor Author

@pabigot
Maybe you can test it on your solution (nrf52_pca10040) as well. Thanks!

Copy link
Contributor

@pabigot pabigot left a comment

Choose a reason for hiding this comment

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

Works with nrf52_pca10040 and iks01a3 shield. Soft reset and reflash both run without locking up.

@erwango
Copy link
Member

erwango commented Nov 22, 2019

@avisconti, can you create a matching issue so we can get this in v2.1 ?

@avisconti
Copy link
Contributor Author

@avisconti, can you create a matching issue so we can get this in v2.1 ?

Yes, sure.

On LSM6DSO sensor the INT1 pin is used for both generating the drdy
interrupt and for switching to I3C hotjoin mode just after reset if
it is at logical '1' level. If you reset the x_nucleo_shield3 board
the LSM6DSO enter in hot join, as INT1 '1' level is preserved by
the level shifter.

This commit switch to INT2 to generate DRDY interrupt, so that INT1
always remain to logical '0' level.

Fixes: zephyrproject-rtos#20933

Signed-off-by: Armando Visconti <[email protected]>
@avisconti avisconti force-pushed the fix-6dso-hotjoin-shield3 branch from d7c8ef4 to 2c06445 Compare November 22, 2019 10:03
@avisconti
Copy link
Contributor Author

Just repushed including the reference to the #20933 bug in the commit message.

@erwango erwango added this to the v2.1.0 milestone Nov 22, 2019
@erwango erwango added the priority: medium Medium impact/importance bug label Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards area: Samples Samples area: Shields Shields (add-on boards) bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x_nucleo_iks01a3 shield: STM LSM6DSO sensor does not work after h/w or s/w reset

5 participants