Appendix C - Scripting; Text File Format - Renesas DA9213 User Manual

Performance boards
Table of Contents

Advertisement

UM-PM-029
DA9213, DA9214, and DA9215 Performance
Boards

Appendix C - Scripting

The software includes the ability to save and load a text file containing hex codes representing the
register addresses and data. This allows a basic scripting functionality on DA9213, DA9214, and
DA9215 for advanced users.
If you wish to use register names directly (easier to read), instead of register addresses, from the
Settings menu select Reg names in file. When selected the slave address is replaced by the word
WRITE2. This is generally preferable and more readable. The register names are stored in an
external file. Hex codes for slave address and register address are still accepted on reading in the
file.
Note 2
The suffix 2 is used to identify coPMIC devices (such as DA9213, DA9214, or DA9215) and
distinguish them from the main PMIC devices (such as DA9063). Although they can share the I
address if STAND_ALONE is set to zero (see Datasheet for details on STAND_ALONE bit operation),
the GUI offers the possibility to assign different I
WRITE automatically uses the main PMIC I
assigned, see Section 6.3.
C.1

Text File Format

Numbers apart from time delays are expressed in Hex, separated by tabs. The use of 0x in front
of the hex value is optional.
The first parameter is the device slave address in 8 bit format.
Alternatively the first parameter can be a token:
WRITE2 writes to the device at the currently selected slave address (I
READ2 reads from the device a the values of a number of registers
PORT sets the selected digital control line to the specified value (1 or 0)
PORTREAD reads the value of the specified digital control line
PORTDIR sets the direction of the digital control line to an input if the value is 0, or an output
if set to 1.
DELAY or WAIT implements a time delay specified up to 65535 milliseconds. The delay time
is specified in decimal, or hex if preceded by 0x.
ITERATE causes the whole script to be repeat the specified number of times.
If you wish to use the GPIO-related commands, you need to jumper the respective jumpers of
J27, to allow the ATSAM3U µC device to really operate on the specific port. The levels are not
forced by DA92112 but instead this is done externally by the ATSAM3U.
The second parameter is the register address as a name or hex value.
The third parameter is the data.
Comments (lines beginning with //) are permitted in the file.
Inline comments (//comment) are permitted.
The data will be processed in the order written, and written directly to the specified device. The
screen controls will be updated once command in the file have finished.
The use of the slave address in the file allows any device attached to the I
The token PORT2 allows control over the GPIOs which are configured as inputs. The second
parameter is the port name. The third parameter is 0 or 1.
For read operations, the result of the read is passed to the history log window
User Manual
CFR0012
2
C addresses to main and coPMIC devices. Thus
2
C address and WRITE2 uses the coPMIC I
Revision 2.0
33 of 37
2
C
2
C address
2
C mode only)
2
C bus to be controlled.
25-Feb-2022
© 2022 Renesas Electronics

Advertisement

Table of Contents
loading

This manual is also suitable for:

Da9214Da9215

Table of Contents