Tool/software:
Hi,
My setup consists of the AFE4404, the Osram SFH7072 biosensor, and a photodiode switching circuit for the SFH7072.
The SFH7072 biosensor includes two photodiodes: IR-CUT and BB.
I would like to use:
- The IR-CUT photodiode for heart rate (HR) and heart rate variability (HRV) measurements.
- The BB photodiode for SpO₂ measurements.
For the AFE's LED1 active and sampling phases, I would like to configure the AFE to measure the IR-CUT photodiode current, in order to minimize the influence of ambient light. 
For the LED2 and LED3 active and sampling phases, the AFE should measure the BB photodiode current.
I’ve already implemented a driver that dynamically calculates timing engine values for each phase, with the pulse repetition frequency (PRF) as a constraint during initialization. 
The timing values follow the datasheet recommendations (Table 12: *Sample Register Settings for Low Interference Across Phases*) to avoid phase overlaps. 
It’s worth noting that I provide the AFE with an external clock signal (CLK_EXT), not the other way around.
My initial idea was to measure HR, HRV, and SpO₂ (using LED1, LED2, and LED3) during a single AFE pulse repetition cycle, as I believe this would simplify future calibration routines.
To accomplish this, I need to switch the photodiode circuit (by setting a control pin LOW or HIGH) immediately after the LED3 active + sampling phase. 
Then I need to switch it back after LED1 is done, to prepare the BB photodiode for LED2 and LED3 in the next cycle.
To handle this correctly, I require two interrupts:
1. One right after LED3 is finished.
2. Another when data is ready (`ADC_RDY`).
While reviewing the datasheet, I came across the `PROG_TG_*` registers. 
I successfully replaced the `ADC_RDY` interrupt with a `PROG_TG` signal.
However, I haven’t been able to generate a `PROG_TG` signal between the LED active phases.
My Questions:
1. Is it possible to generate a `PROG_TG` signal between LED phases, or can it only be used as a replacement for `ADC_RDY`?
2. If the above is possible, can the `PROG_TG_STC` and `PROG_TG_ENDC` registers be modified after the first `PROG_TG` signal? 
 In other words, is it possible to generate multiple `PROG_TG` signals within a single PRF cycle by updating these register values on the fly?
3. Does my approach make sense? Is this how such a setup is typically implemented? 
 If not, could you suggest a better alternative?
Looking forward to hearing from you!
 
				 
		 
					 
                          