The problem seems to stem from the fact that the PS5244A has a buffer size of 49512 which is not a power of 2, you can obtain this from the PS5X44A_MAX_SIG_GEN_BUFFER_SIZE defined constant. To get a more accurate estimate of the ouptut frequency, you must replace 2^(bufferAddressWdith) with 49512.
If the formula were correct, you would expect the PS5244A to simply take the the value of the top 16 bits as the address and make that value restart at 49512. The picoscope seems to do some arithmetic to convert the top 16 bits to a 49512.
This becomes problematic when trying to control the waveform on a 5ns timescale (the output frequency of the DAC).
This can be easily verified by giving an arbitrary waveform and a deltaPhase value of 0x8000. According to the datasheet, this should output a sample every 10 nano seconds, but the samples are output every ~13 nano seconds.
Could you:
1. Update the driver so that it simply takes the value of the top 16 bits as the index in the given waveform as described in the programming guide <- I think this would be the preferred option since it keeps the arithmetic simple.
2. Release the code/formula that converts the phaseAccumulator value to an index in the arbitrary waveform?
I notice you reference PS5244A, only the models ending in B have the AWG function,
also the value you would want to be using for 2^(bufferAdressWidth) is 49152 which is 48kS, there is an error in the documentation which has been reported.
Could you please check which dll version your application is using?
I,m not at work today, but the version of the dll is the one that came with PS5000Asdk_r10_5_0_28.zip
The issue is that bufferAddressWidth is not an integer. You cannot have log2(49152) = 15.6 bits. Typically, a bit width is an integer...
This doesnt affect things for small values of deltaPhase but for larger values, it would be good to know how one obtains the top "15.6" for the buffer index.
frequency = frequency of waveform in hz
waveformSize = size of value form (maximum 49152 samples)
unit - > AWGFileSize = 49152
AWG_PHASE_ACCUMULATOR = 2^32
AWG_DAC_FREQUENCY = 200e6
Please note that 49152 is not the bufferAdressWidth, it is the size of the buffer that stores the values for the AWG.