Skip to content

Commit

Permalink
icm40609d: Clear interrupt status at FIFO reset
Browse files Browse the repository at this point in the history
If DRDY signal is used, the interrupt status needs to be cleared at FIFO reset
in order to make DRDY go back inactive. Otherwise there won't be a falling edge
interrupt at the next sample.

Signed-off-by: Jukka Laitinen <[email protected]>
  • Loading branch information
jlaitine committed Aug 14, 2024
1 parent c3f8756 commit cd76f80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/drivers/imu/invensense/icm40609d/ICM40609D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@ void ICM40609D::FIFOReset()
// SIGNAL_PATH_RESET: FIFO flush
RegisterSetBits(Register::BANK_0::SIGNAL_PATH_RESET, SIGNAL_PATH_RESET_BIT::FIFO_FLUSH);

// Read INT_STATUS to clear
RegisterRead(Register::BANK_0::INT_STATUS);

// reset while FIFO is disabled
_drdy_timestamp_sample.store(0);
}
Expand Down

0 comments on commit cd76f80

Please sign in to comment.