Professional Documents
Culture Documents
API For bNodeUART
API For bNodeUART
API For bNodeUART
Preamble Preamble
Byte-2
Byte-1 Data Type Frame Length Data
(0x7a)
(0xa7) (1 Byte) (2 Byte) (Depends on Data Type and Frame
(1 Byte) Length)
(1 Byte)
(Frame Length -4 )
Note: All the data representation will be sent in Little endian format.
Client ID 0x00
0xa7 0x7a 0x02 Length Write Flag Size of the Address Data to be
of the register of the Written
(1 Byte) (1 Byte) (1 Byte) (1 Byte)
frame Register
(1 Byte) (4 Bytes
(2 Byte) (4 Byte)
Note: Read flag value is 0x80. Write flag value is 0xF0. Size of the register is of 1 byte, which should
be either 2 or 4 depending on the Register value being requested. As of now for writing register you
will not get any reply from bNode.
For Reply frame from bNode: refer Single Register access reply:
E.g. Waveform buffer configuration register (WFB_CFG) can be written with 0x1010/0x1070/0x1270
for corresponding waveform buffer data. for more information about waveform buffer data
configurations refer section Waveform buffer Configurations.
E.g. to get waveform buffer data of 16 resampled, the data frame is as follows
E.g. to get waveform buffer data of Sinc4 output, the data frame is as follows
E.g. to get waveform buffer data of Sinc4 output and IIR Filtered, the data frame is as follows
0xa7 0x7a 0x02 0x000E 0xF0 0x02 0x000004a0 0x00001270
………….
…………
Note:
For Reply frame from bNode: refer Sequential Register access reply:
uint32_t aigain;
uint32_t avgain;
uint32_t aphcal;
uint32_t apgain;
uint32_t airmsos;
uint32_t avrmsos;
uint32_t awattos;
uint32_t avaros;
uint32_t aifrmsos;
uint32_t avfrmsos;
uint32_t afwattos;
uint32_t afvaros;
uint32_t bigain;
uint32_t bvgain;
uint32_t bphcal;
uint32_t bpgain;
uint32_t birmsos;
uint32_t bvrmsos;
uint32_t bwattos;
uint32_t bvaros;
uint32_t bifrmsos;
uint32_t bvfrmsos;
uint32_t bfwattos;
uint32_t bfvaros;
uint32_t cigain;
uint32_t cvgain;
uint32_t cphcal;
uint32_t cpgain;
uint32_t cirmsos;
uint32_t cvrmsos;
uint32_t cwattos;
uint32_t cvaros;
uint32_t cifrmsos;
uint32_t cvfrmsos;
uint32_t cfwattos;
uint32_t cfvaros;
uint32_t nigain;
uint32_t nphcal;
uint32_t nirmsos;
} Update_Calibaration_Params;
Note: All the register data will be sent in little endian format.
Preamble Preamble
Byte-2
Byte-1 Data Type Frame Length Data
(0x7a)
(0xa7) (2 Bytes) (4 Bytes) (Depends on Data Type and Frame
(1 Byte) Length)
(1 Byte)
(Frame Length - 8)
Note: All the data representation will be sent in little endian format.
2.1 Preamble Byte-1 and Preamble Byte-2:
These two bytes to indicate the start of the Data frame. Preamble Byte-1, Preamble Byte-2 are 0xa7,
0x7a respectively.
Client id 0x0000
Example frame:
Example frame:
For the data being sent, the corresponding register bits in the configuration will be set.
Reserved 10 9 8 7 6 5 4 3 2 1 0
(31:11)
If 8 ksps rate registers and Normal rate register need to send the configuration is 0x14 (16 + 4 = 20
=0x14).
Note: the Registers data will be filled as the same sequence mention in the tables of registers.
ADDR_BITHD ADDR_CITHD
(4 Bytes) (4 Bytes)
…………..
E.g. Waveform buffer configuration register (WFB_CFG) can be written with 0x1010/0x1070/0x1270
for corresponding waveform buffer data. for more information about waveform buffer data
configurations refer section Waveform buffer Configurations.
E.g. to get waveform buffer data of 16 resampled, the data frame is as follows
0x1270 Sinc4 + IIR LPF 8ksps 24 bit (packed) Little 1792*7 = 12544
output endian
(2 Bytes)
Note: All the register data will be sent in Little endian format.
#define VOLTAGE_TRANSFER_FUNCTION
(((FP_TYPE)BOTTOM_LEG_DIVIDER_RESISTOR)/(BOTTOM_LEG_DIVIDER_RESISTOR+TOP_LEG_DIVID
ER_RESISTOR))
#define VOLTAGE_MUL_FACTOR (((FP_TYPE)1.0)/(52702092 *
SQUREROOT_OF_2 * VOLTAGE_TRANSFER_FUNCTION))
#define CURRENT_TRANSFER_FUNCTION
(((FP_TYPE)TOTAL_CT_BURDEN_RESISTOR)/CT_TURNS_RATIO)
4 Tables:
4.1 Registers updated at half cycle rate
Register Name Address Type Update Rate Size in bytes