forked from M-Labs/artiq
1
0
Fork 0

ad9914,spi2: add warnings about driver state and DMA. Closes #1113

This commit is contained in:
Sebastien Bourdeauducq 2018-11-17 22:00:49 +08:00
parent 78d4b3a7da
commit a3e0b1c5b4
2 changed files with 15 additions and 0 deletions

View File

@ -175,6 +175,10 @@ class AD9914:
accumulator is set to the value it would have if the DDS had been accumulator is set to the value it would have if the DDS had been
running at the specified frequency since the start of the running at the specified frequency since the start of the
experiment. experiment.
.. warning:: This setting may become inconsistent when used as part of
a DMA recording. When using DMA, it is recommended to specify the
phase mode explicitly when calling :meth:`set` or :meth:`set_mu`.
""" """
self.phase_mode = phase_mode self.phase_mode = phase_mode
@ -190,6 +194,11 @@ class AD9914:
The "frequency update" pulse is sent to the DDS with a fixed latency The "frequency update" pulse is sent to the DDS with a fixed latency
with respect to the current position of the time cursor. with respect to the current position of the time cursor.
When switching from other phase modes to the continuous phase mode,
there is no jump in the DDS phase. This is however not true when
using the continuous phase mode after playing back a DMA sequence
that contained the other phase modes.
:param ftw: frequency to generate. :param ftw: frequency to generate.
:param pow: adds an offset to the phase. :param pow: adds an offset to the phase.
:param phase_mode: if specified, overrides the default phase mode set :param phase_mode: if specified, overrides the default phase mode set

View File

@ -186,6 +186,12 @@ class SPIMaster:
This method is portable and can also be called from e.g. This method is portable and can also be called from e.g.
:meth:`__init__`. :meth:`__init__`.
.. warning:: If this method is called while recording a DMA
sequence, the playback of the sequence will not update the
driver state.
When required, update the driver state manually (by calling
this method) after playing back a DMA sequence.
:param div: SPI clock divider (see: :meth:`set_config_mu`) :param div: SPI clock divider (see: :meth:`set_config_mu`)
:param length: SPI transfer length (see: :meth:`set_config_mu`) :param length: SPI transfer length (see: :meth:`set_config_mu`)
""" """