LPS25HB 气压计 参考手册中关于FIFO功能的解读
文章目錄
- LPS25HB 氣壓計 參考手冊中關于FIFO功能的解讀
- FIFO 普通模式
- FIFO Stream 模式
- Stream-to-FIFO 模式
- Bypass-to-Stream 模式
- FIFO Mean 模式
- Bypass-to-FIFO 模式
- 寄存器表:
LPS25HB 氣壓計 參考手冊中關于FIFO功能的解讀
FIFO 普通模式
1、FIFO 模式的選定 (F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘001’)
2、FIFO 數據的讀取 PRESS_OUT_H (2Ah), PRESS_OUT_L (29h), and PRESS_OUT_XL (28h)
3、水閾中斷:(STOP_ON_FTH bit set to ‘1’ in CTRL_REG2 (21h))
in order to be raised when the FIFO is filled to the level specified by the WTM_POINT[4:0]
bits of FIFO_CTRL (2Eh). 如果FIFO滿了,停止更新數據。
FIFO Stream 模式
1、Stream 模式的選定 (F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘010’),
2、FIFO 數據的讀取 PRESS_OUT_H (2Ah), PRESS_OUT_L (29h), and PRESS_OUT_XL (28h)
注意: FIFO的Stream模式,沒有水閾狀態的更新。當FIFO滿的時候,老的數據會被新的數據更新。當然可以使能中斷的功能。
Stream-to-FIFO 模式
1、Stream-to-FIFO的選定((F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘011’),
2、FIFO 數據的讀取 PRESS_OUT_H (2Ah), PRESS_OUT_L (29h), and PRESS_OUT_XL (28h)
3、水閾中斷:(STOP_ON_FTH bit set to ‘1’ in CTRL_REG2 (21h))
in order to be raised when the FIFO is filled to the level specified by the WTM_POINT[4:0]
bits of FIFO_CTRL (2Eh). 如果FIFO滿了,老數據會被新數據更新。
4、如果觸發事件產生了,FIFO的狀態可以轉為FIFO的普通模式。觸發方式配置寄存器INTERRUPT_CFG (24h).
Bypass-to-Stream 模式
1、Bypass-to-Stream 模式的選定(F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘100’),
2、觸發方式設置INTERRUPT_CFG (24h). 利用觸發方式將ByPass 模式轉為Stream 模式,中斷源INT_SOURCE (25h) 的IA位來判斷
FIFO Mean 模式
1、FIFO Mean模式的選定(F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘110’),
2、FIFO Mean模式的特點:In this mode the FIFO is used to implement a moving average of the pressure data with a 2, 4, 8, 16 or 32 sample set by changing the FIFO Mean mode sample size defined by the WTM_POINT[4:0] bits of FIFO_CTRL (2Eh) (refer to Table 9).
3、該模式下的數據讀取:
There are two possible ways of providing the output pressure data averaged by FIFO:
ODR of the data coming from the sensor;
(@1 Hz when ODR = 4 or 2; @1.04 Hz when ODR=3).
注意:該模式下,不允許直接讀取FIFO的內容。
Bypass-to-FIFO 模式
1、Bypass-to-FIFO 模式的選定(F_MODE[2:0] in FIFO_CTRL (2Eh) set to ‘111’),
2、觸發方式設置INTERRUPT_CFG (24h). 利用觸發方式將ByPass 模式轉為Stream 模式,中斷源INT_SOURCE (25h) 的IA位來判斷
寄存器表:
總上表中可以將寄存器總結如下:
**控制寄存器:**Control registers、Interrupt registers、FIFO configure registers、Resolution register
狀態寄存器:Status register
參數寄存器:Who am I register、Reference pressure 、Pressure threshold registers、Pressure offset registers
數據輸出寄存器:Pressure output registers、Temperature output registers
總結
以上是生活随笔為你收集整理的LPS25HB 气压计 参考手册中关于FIFO功能的解读的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LPS25HB 气压计 的嵌入式程序开发
- 下一篇: LPS25HB 寄存器读写程序解读