Answer

Feb 11, 2025 - 02:39 AM
To configure the flicker detection function on the ams TMD3719, you can use either the on-chip mode or the data sampling mode. Here are the steps for each mode:
On-Chip Mode:
1. Enable flicker detection by setting the FDEN bit in register 0x80 bit 6 (MEAS_MODE1.FDEN) to 1.
2. Set the measurement time for flicker by using register FD_CFG0.FD_TIME (0x40 bits [1:0]). You can choose between 50/100/200 milliseconds for a frequency bin resolution of 20/10/5 Hz, respectively.
3. Optionally, you can define a user-defined FD_TIME by setting FD_SAMPLE_TIME in registers FD_CFG7 (0x47 bits [7:0]) and FD_CFG8 (0x48 [1:0]) in combination with FD_SAMPLES of register FD_CFG0 (0x40 bits [4:3]).
4. Configure other necessary registers such as FD_CFG5 (0x45) to select the modulator channels to be used and MOD_GAIN registers (0x89, 0x8A, 0x8B, 0x8C) to set the modulation gain.
5. The on-chip flicker function uses the Goertzel Algorithm embedded in the device.
Data Sampling Mode:
1. Configure the ENABLE register (0x80) to enable the device (PON = 1).
2. Configure the FD_CFG0 register (0x40) to set the FD_TIME (e.g., 200 ms) and FD_SAMPLES (e.g., 128).
3. Configure the MOD_GAIN registers (0x89, 0x8A, 0x8B, 0x8C) to set the modulation gain.
4. Configure other necessary registers such as FD_CFG5 (0x45) to select the modulator channels to be used and MEAS_MODE1 (0x82) to set the flicker detection mode and FIFO_MODE.
5. Configure the FIFO_MAP2 register (0xFA) to enable writing data to the FIFO.
6. To clear the FIFO, follow the steps mentioned in the manual.
7. To poll flicker data, read the FIFO_STATUS register (0xFB) to check the FIFO level and overflow flag. If the FIFO is not empty, read the FIFO buffer data (FDATA) starting from address 0xFC.
Please refer to the ams TMD3719 Flicker Detection User Guide for more detailed information on configuring and using the flicker detection function.
Add New Comment