- Silicon Labs Community
- Welcome and Announcements
- Silicon Labs Knowledge Base
- 8-bit MCU
- 32-bit MCU
- Bluetooth / Wi-Fi
- Other Products Category
- Optical/RH/Temp Sensor
- Other Products
- Hardware and Software Tools
- Simplicity Studio and Software
- General Discussions and Suggestions
- Chinese Forum
- Software Libraries
- Development Kits
- Reference Designs
- Third Party Tools
- White Papers
- Official Blog of Silicon Labs
- Chinese Blog
03-21-2017 02:23 AM
[MEAS_RATE value ] [ timer interval ]
65535 52 seconds
I cannot get timer working properly with longer intervals than 3 s.
Does timer have full uint16_t resolution as register size?
03-21-2017 09:41 AM
Sorry, probably i didn't explained clearly.
I work to make Si1133 interrupt every ~20-30 seconds, i read in datasheet that interrupt period depends on uint16_t MEAS_RATE register value. One tick in this register represents 0.8 ms period. So it seems that longest interval could be ~52 seconds (65535*0.8ms).
I tried practically, set meas_rate to 1,2,3..5...15 seconds. With 1,2,3 sec settings works fine. With 5, 15 seconds setting, with oscilloscope i see that interrupts happen every 1.xxx, 2.xxx second. So it leads to logical conclusion that meas_rate is controlled by actual 12 bit timer, because seems that it works well with raw values till 4096 (3,2768 second).
03-21-2017 10:47 AM
The setting of MEASRATE is limited by the internal low-frequency clock. If you want to configure Si1133 to take measurements every 20s, I would recommend you set MEASRATE to 1s and MEASCOUNT1 to 20 so that the internal counter can help you control the interrupt frequency.
03-22-2017 07:20 AM
I did so, setted MEASRATE to 1s and MEASCOUNT1 to 20, but actual period is 15.3 seconds.
After every interrupt i'am reading block of 4 bytes starting from SI115x_REG_IRQ_STATUS.
Maybe i need to call PAUSE command before reading or RESET after reading, could you please help why i'am not getting exact period as seted.
03-22-2017 10:23 AM
Can you use the clock in your MCU to control the measurement period? If so, you can call the Force measurement command periodically to read the data from the sensor.
In autonomous mode, the internal clock isn't accurate for long measurement rate setting. You can keep reducing the MEASRATE and increasing the MEASCOUNT1 setting to see if that helps.