B.2 Reflected bits
27.0103GPPTerminal Equipment to User Equipment (TE-UE) multiplexer protocolTS
In the example the bits where shown as they was sent on the serial line, this is however not they way the application sees the octets, it will see MSB first and LSB last, so before calculating the FCS the octets bit order must be reversed.
|
BOFC |
DLC |
Ctrl |
FCS |
EOFC |
|
0xF9 |
0x07 |
0x3F |
0xF9 |
|
|
11111001 |
00000111 |
00111111 |
To be calculated |
11111001 |
1 Reverse all bit in octets.
2 Calculate FCS.
3 Reverse all bits in FCS.
4 Send the reversed FCS.
Fortunately there is an easier way of doing the reversing of the bits, when implementing the CRC calculation using table lookup the table can be reversed.