User Manual

43
Response Format:
Byte number
1
2
3
4
5
6
7
Byte Definition
Sync
Addr
Resp1
Resp2
Data1
Data2
ChkSum
Extended Response
0xFF
0x01
0x00
0x00
Voltage
MSB
Voltage
LSB
--
Voltage is in mV.
Command format: Get
Byte number
1
2
3
4
5
6
7
Byte Definition
Sync
Addr
Cmd1
Cmd2
Data1
Data2
ChkSum
Query LED4 voltage
0xFF
0x01
0x16
0x6F
0x00
0x00
--
Response Format:
Byte number
1
2
3
4
5
6
7
Byte Definition
Sync
Addr
Resp1
Resp2
Data1
Data2
ChkSum
Extended Response
0xFF
0x01
0x00
0x00
Voltage
MSB
Voltage
LSB
--
Voltage is in mV.
5.1.8.8 System error code
Command format: Get
Byte number
1
2
3
4
5
6
7
Byte Definition
Sync
Addr
Cmd1
Cmd2
Data1
Data2
ChkSum
Query system error
code
0xFF
0x01
0x18
0x6F
0x00
0x00
--
Response Format:
Byte number
1
2
3
4
5
6
7
Byte Definition
Sync
Addr
Resp1
Resp2
Data1
Data2
ChkSum
Extended Response
0xFF
0x01
Error
byte3
Error
byte2
Error
byte1
Error
byte0
--
Error code: [byte3][byte2][byte1][byte0]
/*** Error code ***/
#define ErrorCode_None 0x00000000 //System is OK
//system or module
#define ErrorCode_WDTTimeout_bm 0x00000001 //internal watchdog
#define ErrorCode_RTC_CalibFailCmd_bm 0x00000002 //MCU uart1 rx buffer overflow
#define ErrirCode_EEPROM_WrFail_bm 0x00000004 //can't write into EEPROM
//LED functions
#define ErrorCode_OVP1_bm 0x00000100 //LED driver's OVP voltage is exceed 1.2V
#define ErrorCode_OVP2_bm 0x00000200 //LED driver's OVP voltage is exceed 1.2V
#define ErrorCode_OVP3_bm 0x00000400 //LED driver's OVP voltage is exceed 1.2V
#define ErrorCode_OVP4_bm 0x00000800 //LED driver's OVP voltage is exceed 1.2V
#define ErrorCode_LED_OverTemp 0x00001000 //over-temperature
#define ErrorCode_LED_UnderTemp 0x00002000 //under-temperature