TSL2521 ALS/Flicker
TSL2521 ALS and Flicker Settings
Application Note
• PUBLIC
AN001042
• v1-01 • 2022-Jan-27
23
│ 9
2.4
ALS and Flicker Timing
For ALS measurements one of the most important parameters is the ALS integration time. On legacy
devices like the TCS3707 that was the product of the modulator clock period at e.g. 2.78 µs, the value
in the ASTEP register (+1) and the value in the ATIME register (+1) as shown in Equation 3.
Equation 3:
𝐴𝐿𝑆 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒
[𝑇𝐶𝑆3707]
= 2.78µs ∗ (𝐴𝑆𝑇𝐸𝑃 + 1) ∗ (𝐴𝑇𝐼𝑀𝐸 + 1)
On TSL2521, it is almost the same but the modulator clock changed to 1.3889 µs and the register/bit
field names are different as Equation 4 shows.
Equation 4:
𝐴𝐿𝑆 𝑖𝑛𝑡𝑒𝑔𝑟𝑎𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒
[𝑇𝑆𝐿2521]
= 1.3889µs ∗ (𝑠𝑎𝑚𝑝𝑙𝑒_𝑡𝑖𝑚𝑒 + 1) ∗ (𝑎𝑙𝑠_𝑛𝑟_𝑠𝑎𝑚𝑝𝑙𝑒𝑠 + 1)
On TSL2521, the first term
– the modulator clock multiplied by sample_time – is the base sampling
time both for flicker measurements and for ALS measurements. If Flicker measurement is activated for
a modulator within the active sequencer step, every value at the end of the sampling time is pushed to
the FIFO
– as often as set in fd_nr_samples in registers
FD_NR_SAMPLES0
and
FD_NR_SAMPLES1
- and increases at the same time the ALS result
– as often as set in
als_nr_samples in registers
ALS_NR_SAMPLES0
and
ALS_NR_SAMPLES1
.
Therefore, the Flicker sampling frequency is the reciprocal of the sampling time set with register
SAMPLE_TIME, as shown in Equation 5.
Equation 5:
𝐹𝑙𝑖𝑐𝑘𝑒𝑟 𝑠𝑎𝑚𝑝𝑙𝑖𝑛𝑔 𝑓𝑟𝑒𝑞𝑢𝑒𝑛𝑐𝑦 =
1
1.3889 ∗ (𝑠𝑎𝑚𝑝𝑙𝑒_𝑡𝑖𝑚𝑒 + 1)
The whole flicker measurement time is defined by the mentioned sampling time and the register
FD_NR_SAMPLES, see Equation 6.
Equation 6:
𝐹𝑙𝑖𝑐𝑘𝑒𝑟 𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑚𝑒𝑛𝑡 𝑡𝑖𝑚𝑒
= 1.3889µs ∗ (𝑠𝑎𝑚𝑝𝑙𝑒_𝑡𝑖𝑚𝑒 + 1) ∗ (𝑓𝑑_𝑛𝑟_𝑠𝑎𝑚𝑝𝑙𝑒𝑠 + 1)
Note that there is only one new ALS result after the ALS integration time for each modulator 0 and
modulator 1 since all single sample values are summed up. In contrast, there are fd_nr_samples
flicker results per chosen modulator in the FIFO after the Flicker measurement time of one step. If that
number of flicker results is more than the FIFO can handle
– 256 values with 16-bit width are normally
possible
– the FIFO needs to be read out during the flicker measurement time to prevent a FIFO
overflow. Figure 8 and Figure 9 show the relation between ALS and flicker measurement within the
same step 0 of the sequencer with the chosen settings.