The get-device-reg
command performs an inquiry read, typically used for non-intrusive inspection, while read-device-reg
does a standard access that may trigger side-effects in the device. Note that not all device models support inquiry accesses.
The field parameter can be specified to get the value of a register field. One can use the print-device-reg-info
command to see which fields a register has.
The -l or -b flags are used to specify in what byte order the read data (that is a whole register or a register field) should be interpreted. The default is to interpret data as little-endian, except when a whole register is read out (i.e. no field argument is passed) from the bank that declares big-endian as its as its preferred byte order (which can happen for devices written in DML).