If the processor detects a bad checksum in any command, the following 2-byte normal response will be sent and nothing further will
be done.
Response:
Byte
0
0xB8
1
0xB8
5.2.2 - ConfigU3
Writes and reads various configuration settings. Although this function has many of the same parameters as other functions, most
parameters in this case are affecting the power-up values, not the current values. There is a hardware method to restore bytes 9-
20 to the factory default value of 0x00: Power up the U3 with a short from FIO6 to SPC (FIO2 to SCL on U3 1.20/1.21), then
remove the jumper and power cycle the device again.
If WriteMask is nonzero, some or all default values are written to flash. The U3 flash has a rated endurance of at least 20000
writes, which is plenty for reasonable operation, but if this function is called in a high-speed loop with a nonzero WriteMask, the
flash could eventually be damaged.
Note: If the stream is running, you cannot update any of the values (WriteMask must equal 0).
Command:
Byte
0
Checksum8
1
0xF8
2
0x0A
3
0x08
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
WriteMask0
Bit 5: CompatibilityOptions Defaults
Bit 4: TimerClockConfig and Divisor
Defaults
Bit 3: LocalID
Bit 2: DAC Defaults
Bit 1: Digital I/O Defaults
Bit 0: Reserved
7
WriteMask1 (Reserved)
8
LocalID
9
TimerCounterConfig
Bits 4-7: TimerCounterPinOffset
Bit 3: Enable Counter1
Bit 2: Enable Counter0
Bit 0-1: Number of timers enabled
10
FIOAnalog
11
FIODirection
12
FIOState
13
EIOAnalog
14
EIODirection
15
EIOState
16
CIODirection
17
CIOState
18
DAC1Enable
19
DAC0
20
DAC1
21
TimerClockConfig
22
TimerClockDivisor ( 0 = ÷256)
23
CompatibilityOptions
24
0x00
25
0x00
Response:
Byte
0
Checksum8
1
0xF8
2
0x10
3
0x08
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
Errorcode
7
Reserved
8
Reserved
9-10
FirmwareVersion
11-12
BootloaderVersion
13-14
HardwareVersion
15-18
SerialNumber
19-20
ProductID
21
LocalID
22
TimerCounterMask
23
FIOAnalog
24
FIODirection
25
FIOState
26
EIOAnalog
27
EIODirection
28
EIOState
29
CIODirection
30
CIOState
31
DAC1Enable
32
DAC0
33
DAC1
34
TimerClockConfig
35
TimerClockDivisor (0 = ÷256)
36
CompatibilityOptions
37
VersionInfo
WriteMask
: Has bits that determine which, if any, of the parameters will be written to flash as the reset defaults. If a bit is 1,
that parameter will be updated with the new passed value. If a bit is 0, the parameter is not changed and only a read is
performed. Note that reads return reset defaults, not necessarily current values (except for LocalID). For instance, the value
returned by FIODirection is the directions at reset, not necessarily the current directions.
LocalID
: If the WriteMask bit 3 is set, the value passed become the default value, meaning it is written to flash and used at
44