I have lsm6dso sensor. I am using fsm interrupt for different events. I have 3 programs in fsm. When the event detected, interrupt comes.I gave three fsm program to same interrupt pin. But I want to know which fsm event detected ?
I have lsm6dso sensor. I am using fsm interrupt for different events. I have 3 programs in fsm. When the event detected, interrupt comes.I gave three fsm program to same interrupt pin. But I want to know which fsm interrupt detected .
When I read the register as given in example , fsm1, fsm2 and fsm3 stays zero.
Is there another way to know know which fsm has been detected ?
This method is not working. It can detect the event but I cannot distinguish which event happened.
/* Read interrupt source registers in polling mode (no int) */
lsm6dso_all_sources_t status;
lsm6dso_all_sources_get(&dev_ctx, &status);
if (status.fsm1) {
sprintf((char *)tx_buffer, "glance detected\r\n");
tx_com(tx_buffer, strlen((char const *)tx_buffer));
}
if (status.fsm2) {
sprintf((char *)tx_buffer, "motion detected\r\n");
tx_com(tx_buffer, strlen((char const *)tx_buffer));
}
if (status.fsm3) {
sprintf((char *)tx_buffer, "no motion detected\r\n");
tx_com(tx_buffer, strlen((char const *)tx_buffer));
}
