這裡介紹一下BMI160 的Significant motion detection中斷設定功能,BMI160 內建中斷控制器,可以透過暫存器的設置來啟動Significant motion detection的設置,當偵測到Significant motion detection事件就可以透過指定的中斷輸出接腳來通知主控端,來完成到Significant motion detection 中斷的偵測。
Significant motion detection 中斷是加速度計的一種應用,常用於裝置中特定移動的偵測。
要設置Significant motion detection 的interrupt 必需要設置Significant motion detection,需要設置如下Significant motion detection 的threshold 可設置範圍及設置方式如下所示:
要設置Significant motion detection 的interrupt 必需要設置Significant motion detectio,需要設置如下int_sig_mot_sel, int_sig_mot_skip,int_sig_mot_proof 的threshold 相關設定:
要致能 Significant motion detection 的interrupt,需要設置如下暫存器位元0,1,2的any motion enable致能位元,設置方式如下所示:
再來設定指定的Significant motion detection interrupt的輸出腳和設定訊號作動方式和準位,設置方式如下所示:
BMI160 支援interrupt 觸發時序配置,可以調整Significant motion detection interrupt的輸出腳的latch time,設置方式如下所示:
最後還需指定Significant motion detection interrupt的BMI160的 INT腳位輸出,
設置方式如下所示:
評論