Designs | Programming |
Spock maintains a 16 bit counter to track the current sample address in capture RAM during a trace. The counter stops at the end of a trace and its value used for data upload. The Sample Pre-load registers are used to program the sample address from which Spock should start counting when a trace is enabled. Usually these will be programmed to be zero but can be any 16 bit value:
Note the address range of the RAM page to which data may be captured is 14 bits. That is, the 16 bit counter cycles through a page 4 times before it wraps. This may seem redundant, but is in fact useful when the counter is used for frequency or period measurement purposes. The Sample Capture registers contain the Spock sample address after a trace has completed following the assertion of the trigger and the execution of the Capture Spock Counter command <:
It will usually be most convenient to use the value of the Sample Address Counter returned automatically upon completion of Trace command instead of updating and reading the R9, R10 registers. The counter value is returned as a string of 6 characters: <CR> <H3> <H2> <H1> <H0> <CR> where <H?> are the 4 hex digits of the 16 bit counter value. |
Copyright © 2023 BitScope Designs