SENA Rhio10 User Manual

Page 50

Advertising
background image

50

- LRC (BCC)

Checks for any Errors in the command block.

Bytewise XORed value from START FLAG field to DATA field

(refer to example below)

- END FLAG

CR+LF ( 0x0D+0x0A )

-. The data of LENGTH and LRC is expressed as follows.

Each 4-bit nibble (upper 4-bit nibble and lower 4-bit nibble) is expressed as 1

Byte data. The 1-byte conversion of the 4-bit data is as follows.

0x0 ~ 0x9

0x30 ~ 0x39, 0xA ~ 0xF 0x41 ~ 0x46

If the Rhio receives the data converted, then it converts it to original by inverse.

-. The timeout from the start of the frame to the time when it receives LF is 5 sec.

-. Rhio will discard the command if there is any error in the command received (BCC

Error or Time Out) and will wait for the next command (Users have to write a code so that it will

have to wait at least 5 sec if there is no response from Rhio after sending the command.)

*

An Example of the LRC calculation is as follows :

XOR from Start Flag field to the Data Field use the following as an example :

(3A) (30 33) (30 33) (30) (30 41) (0D 0A)

Do the following :

((((3A xor 30) xor 33) xor 30) xor 33) xor 30 = 0A

0A gets translated as 0 and A, the byte conversion, which is as follows:

0x0 ~ 0x9 gets converted as 0 and A, the byte conversion, which is as follows :

0x0 ~ 0x9 gets converted to 0x30 ~ 0x39

0xA ~ 0xF gets converted to 0x41 ~ 0x46

In the case of above 0 =30 and A = 41, thus the LRC is 30 41, as shown above.

5.3.1.2 NAK Response

- NAK Response condition

-. When there is Data BCC Error when receiving the command

-. When the command data is not completed within 1 sec after it is started (Time out)

-. When the length of the Data frame is not same as the one in the command

(Frame Length error)

Advertising