TSL2521 ALS/Flicker
Flicker Result Data Format
Application Note
• PUBLIC
AN001042
• v1-01 • 2022-Jan-27
23
│ 20
Additionally, it is possible to remove up to three of the four Residual bits from the flicker data format
width by using field[1:0] mod_residual_bits_ignore in register
CFG9
(0xAA), an example is shown in
Figure 16:
Flicker Data Format 9-Bit Width With Only 2 Residual Bits as Example
Nevertheless, such a Residual bit reduction is often not recommended, especially high flicker
frequencies do result in a rather small dynamic range, additional Residual bits can improve this
situation significantly.
Information
Analog saturation is shown in the flicker data result by forcing all bits to 1. There is no digital
saturation flag implemented to signal that the data exceeds a reduced transfer bit width, hence the
user must select the flicker data width correctly depending on the sample_time setting.
TSL2521 has a built in non-destructive flicker data compression mode as well that reduces the I
2
C
traffic significantly, the drivers provided by ams OSRAM show and document the use of these
features.
4.3
Flicker Data Transfer Via FIFO
Flicker data is always written to the FIFO if flicker measurement is enabled in a sequencer step
starting by the lowest modulator number selected for flicker measurement. Additionally,
mod_fifo_fd_gain_write_enable, bit 5 of register MEAS_MODE1, should be enabled to identify the
used gain, especially when AGC is enabled. The flicker measurement gain
– same as ALS modulator
gain if activated in the same step
– is written to the FIFO as FD_STATUS2 and FD_STATUS3
(reserved) in the same structure as ALS_STATUS2 and ALS_STATUS3 (reserved), no matter how
many channels are enabled for flicker data collection.
Figure 17 shows the FIFO data structure in case of one modulator enabled for flicker measurement
with 16-bit flicker data to be transferred. For demonstration reasons fd_nr_samples is set to 3. 16-bit
data is transferred with the low byte first.
14 13 12 11 10 9
8
7
6
5
4
3
2
1
Full counts
Residuals
Internal 16 bit flicker data format:
0
mod_residual_bits_ignore = 2
mod_fd_fifo_datax_width = 8
7
6
5
4
3
2
1
0
Full counts
Residuals
Flicker data on FIFO:
8
15