Hello,
after attempting to use the phase *** function to phase modulate a signal, it seems this won't work because I can't get the phase to retard as I want it to - it only advances. I am now thinking that the best option to get specific phase shifts is to use the frequency ramping function - start at a known frequency, ramp up then immediately ramp back to the original value, and phase shift is the area under the ramps.
Ideally I want to give some kind of trigger to initiate a ramp sequence to give a phase shift, as per this picture:
I am struggling to do this when ramping automatically. I have my two ramps set up to give very small shifts for now, so I can see it on the scope. I have:
RAMP0_INC = 1, RAMP0_LEN = 1
RAMP1_INC = -1, RAMP1_LEN = 1
Setup 1:
When I set this up to run continuously (RAMP0_NEXT_TRIG = TOC TIMEOUT, RAMP1_NEXT_TRIG = TOC_TIMEOUT) it does exactly as I expect - the scope shows a slow, steady phase advance. The speed it moves at is exactly as I calculated, so no problem there.
The problem comes when I want to trigger it. I've tried the following options:
Setup 2:
Set to burst mode and tell it to run two ramps. The problem is that when I click the RAMP_EN button, there is sometimes a sudden large phase change. I need phase to be continuous so cannot have these large jumps. Is there any way continuous phase can be guaranteed when enabling/disabling RAMP_EN?
Setup 3:
Set it to continuous ramping, with external triggers controlled by the following trigger settings:
RAMP0_NEXT_TRIGGER = TRIGGER A
RAMP1_NEXT_TRIGGER = TRIGGER A
TRIGGER A = RampClk Pin Rising Edge
This does exactly the same as the continouous ramping setup (setup 1) with a constant gradula phase shift. It seems to be completely ignoring the requirement to wait for the external trigger before doing a frequency ramp.
Setup 4:
Set up for manual ramping (would prefer not to use this if possible). Using the 'Clock Ramp' and 'Reverse Direction' buttons I can see frequency changes in the appropriate direction, but I get a similar problem to setup 2. When I do a frequency step to jump to or from the initial frequency, there's sometimes a big sudden phase shift. Video below whows the issue. See the phase jumps at 12 and 16 seconds.
I'm really hoping that there's some setting I can change in a register somewhere that allows me to get reliable shifts without any of these big jumps. Let me know if there's something I can adjust to get this.
Thanks,
Gordon.