Dual SiPM Peak Detect and Coincidence Timing on STM32F446RE
Hello everyone,
I am working on a cosmic muon detector project using two SiPM detectors and an STM32F446RE Nucleo board.
My circuit holds the fast SiPM pulse for 20 µs. The two analog signals are connected to ADC Channel 0 (PA0) and ADC Channel 1 (PA1).
What I want to do:
-
Time Difference ($\Delta t$): Measure the exact arrival time between both detector pulses to check if it is a real muon (coincidence window).
-
ADC Measurement: Read both peak voltages at the same time and convert them to mV.
-
Serial Output: Print the time difference ($\Delta t$), raw ADC values, and mV values to the Serial Monitor via UART.
My questions:
-
What is the best way to configure the STM32 timer (Input Capture) to measure the small time difference between the two pulses?
-
Should I use Dual Simultaneous ADC mode to sample both channels at the exact same time?
-
How should I set up the code in STM32CubeIDE so the serial output does not miss fast events?
Any simple example code or setup advice would be very helpful.
Thank you!
