I need the SPI clock and the device clock to be synchronized. I am using an Arduino (ATMega 2560) to communicate with the device. The device clock is being generated from using a timer on the Arduino (16-bit Timer).
The SPI clock is also from the SCK pin on the Arduino (pin 52 in this case). From the ATMEGA2560 data sheet I am sure that both these clocks are derived from the onboard crystal oscillator so theoretically they should be in sync. However, I want to visualize this and then make sure they are in sync. I tried using an oscilloscope, but I am unable to trigger both channels at the same time. I am using a Siglent SDS 1052DL+. Can somebody give me guidance on how to use a scope for this purpose?
Edit: removed Arduino code.