![SCT Scout SC4415 User Manual Download Page 16](http://html.mh-extra.com/html/sct/scout-sc4415/scout-sc4415_user-manual_1220014016.webp)
Document# SCT-UM026FVC
Page 16 of 46
Confidential
The selection of the Command Queue can be made when Buffer Mode is enabled using the
enabled Command Queue is indicated by Primary Queue prompt or the Secondary Queue prompt as shown in Table
3.2.1-1. The execution behavior of the Primary and Secondary Command Queue largely depends on the configuration
of the trigger signal which can be set using the
command. The trigger sources can be configured to either
execute the Command Queue in a one-shot fashion or in a repeated mode. The repeated mode allows for the content
of the Command Queue to persist between the received trigger signals.
The Command Queues has limited space to store commands. The majority of commands require only a single unit of
space while others may require up to 8 units. The free space available in the Command Queues can be observed by
executing the
In the example below, the primary buffer is selected and the prompt changes from the Standard Prompt to the Primary
Queue Prompt. Following this, two commands are queued into the Primary Command Queue. The trigger is then
configured as a software source with the repeat option enabled. Once the trigger is configured, the prompt returns to
the Standard Prompt and the Command Queue can be executed multiple times by invoking the software trigger.
# Enable Buffer Mode (Primary).
->buffer 1
# Queue two GPIO operations.
B>gpw 0x01 0x01
B>gdr
# Enable a Repeated Software Trigger.
B>trigger_in 1 1
# Execute Software Trigger twice.
->trigger_in 1
->trigger_in 1
3.2.5
Data Queue
The Data Queue is a temporary storage mechanism which holds the data which has been returned by various
commands. Depending on the type of command and its configuration, the amount of data returned will vary. When
accessing the Data Queue, the data order is maintained such that the bytes received first are the first to be returned
when read.
The data stored in the Data Queue is retained until it is read using the
command. Depending on the arguments
provided with the Read command, a portion or all of the available data may be returned. When data is read or
dequeued, it is effectively shifted out of the queue meaning that it is only available to be read once.
The Data Queue manages its queue data differently depending on the current Command Mode. In Immediate Mode,
only the data received from the most recent command is retained in the queue. When Buffer Mode is enabled, the
Data Queue will retain all data received until the queue is read or the maximum storage capacity is exceeded.
Similar to the Command Queue, the Data Queue has limited storage space. The
the number of bytes available as well as a flag which indicates if the Data Queue is full. If the Data Queue becomes full,
the oldest data will be preserved while any new data will not be stored.
In the example below, two
commands are executed in Buffer Mode. In this case, the
has been
configured as one byte, therefore, each SPI read will return 5 bytes of data. The queued commands are then triggered
using the
command which results in the execution of the two commands. Using the
state of the Data Queue is observed to have 10 bytes are available. The
command is then used to selectively
return only the first 5 bytes, formatted as Stream Format. The updated status of the Data Queue now indicates that 5
bytes of data remain in the queue. The remaining data bytes can be returned with subsequent reads.
# Enable Buffer Mode (Primary).
->buffer 1
# Queue two SPI Read operations.
B>s_read 5 0x1 0x30
B>s_read 5 0x1 0x40
# Execute a Single Software Trigger to