You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lis2dw12_pin_int1_route_set() and lis2dw12_pin_int2_route_set() functions besides configuring interrupt routing also set/reset global interrupts enable flag in CTRL7. The issue is not all interrupts are checked and it is possible to have the a valid interrupt flag for specific case enabled while global interrupts enable will be reset.
Here are the conditions for lis2dw12_pin_int1_route_set()
Consider scenario where INT1 is configured for wake-up (int1_wu) and INT2 for fifo threshold (int2_fth). Now if the user wants to disable int1_wu, the int2_fth won't be checked by the condition in the code snippet above. This results in resetting CTRL7 interrupts enable flag even though there is an interrupt enabled!
In my opinion the interrupts should be disabled only when both CTRL4_INT1_PAD_CTRL or CTRL5_INT2_PAD_CTRL are zero.
The text was updated successfully, but these errors were encountered:
lis2dw12_pin_int1_route_set() and lis2dw12_pin_int2_route_set() functions besides configuring interrupt routing also set/reset global interrupts enable flag in CTRL7. The issue is not all interrupts are checked and it is possible to have the a valid interrupt flag for specific case enabled while global interrupts enable will be reset.
Here are the conditions for lis2dw12_pin_int1_route_set()
lis2dw12_pin_int2_route_set() :
Consider scenario where INT1 is configured for wake-up (int1_wu) and INT2 for fifo threshold (int2_fth). Now if the user wants to disable int1_wu, the int2_fth won't be checked by the condition in the code snippet above. This results in resetting CTRL7 interrupts enable flag even though there is an interrupt enabled!
In my opinion the interrupts should be disabled only when both CTRL4_INT1_PAD_CTRL or CTRL5_INT2_PAD_CTRL are zero.
The text was updated successfully, but these errors were encountered: