Skip to main content
CRC Calc

CRC-16 / M17

Width16-bitRefInNoRefOutNo

Need custom parameters? Open in full calculator

Standard test string

Result

0x772B

Similar CRC Algorithms

Result is calculated from the current input. Check is the published verification value for the standard input 123456789. Click another algorithm to view its detail page.

CRC Lookup Table

0x00000x59350xB26A0xEB5F0x3DE10x64D40x8F8B0xD6BE0x7BC20x22F70xC9A80x909D0x46230x1F160xF4490xAD7C
0xF7840xAEB10x45EE0x1CDB0xCA650x93500x780F0x213A0x8C460xD5730x3E2C0x67190xB1A70xE8920x03CD0x5AF8
0xB63D0xEF080x04570x5D620x8BDC0xD2E90x39B60x60830xCDFF0x94CA0x7F950x26A00xF01E0xA92B0x42740x1B41
0x41B90x188C0xF3D30xAAE60x7C580x256D0xCE320x97070x3A7B0x634E0x88110xD1240x079A0x5EAF0xB5F00xECC5
0x354F0x6C7A0x87250xDE100x08AE0x519B0xBAC40xE3F10x4E8D0x17B80xFCE70xA5D20x736C0x2A590xC1060x9833
0xC2CB0x9BFE0x70A10x29940xFF2A0xA61F0x4D400x14750xB9090xE03C0x0B630x52560x84E80xDDDD0x36820x6FB7
0x83720xDA470x31180x682D0xBE930xE7A60x0CF90x55CC0xF8B00xA1850x4ADA0x13EF0xC5510x9C640x773B0x2E0E
0x74F60x2DC30xC69C0x9FA90x49170x10220xFB7D0xA2480x0F340x56010xBD5E0xE46B0x32D50x6BE00x80BF0xD98A
0x6A9E0x33AB0xD8F40x81C10x577F0x0E4A0xE5150xBC200x115C0x48690xA3360xFA030x2CBD0x75880x9ED70xC7E2
0x9D1A0xC42F0x2F700x76450xA0FB0xF9CE0x12910x4BA40xE6D80xBFED0x54B20x0D870xDB390x820C0x69530x3066
0xDCA30x85960x6EC90x37FC0xE1420xB8770x53280x0A1D0xA7610xFE540x150B0x4C3E0x9A800xC3B50x28EA0x71DF
0x2B270x72120x994D0xC0780x16C60x4FF30xA4AC0xFD990x50E50x09D00xE28F0xBBBA0x6D040x34310xDF6E0x865B
0x5FD10x06E40xEDBB0xB48E0x62300x3B050xD05A0x896F0x24130x7D260x96790xCF4C0x19F20x40C70xAB980xF2AD
0xA8550xF1600x1A3F0x430A0x95B40xCC810x27DE0x7EEB0xD3970x8AA20x61FD0x38C80xEE760xB7430x5C1C0x0529
0xE9EC0xB0D90x5B860x02B30xD40D0x8D380x66670x3F520x922E0xCB1B0x20440x79710xAFCF0xF6FA0x1DA50x4490
0x1E680x475D0xAC020xF5370x23890x7ABC0x91E30xC8D60x65AA0x3C9F0xD7C00x8EF50x584B0x017E0xEA210xB314

CRC Source Code

/* 
 * Model: CRC-16 / M17 (16-bit)
 * Poly: 0x5935, Init: 0xFFFF, XorOut: 0x0000
 * CRC Table C Source Code & Lookup Table Generator
 */
#include <stdint.h>
#include <stddef.h>

const uint16_t crc_table[256] = {
  0x0000, 0x5935, 0xB26A, 0xEB5F, 0x3DE1, 0x64D4, 0x8F8B, 0xD6BE, 
  0x7BC2, 0x22F7, 0xC9A8, 0x909D, 0x4623, 0x1F16, 0xF449, 0xAD7C, 
  0xF784, 0xAEB1, 0x45EE, 0x1CDB, 0xCA65, 0x9350, 0x780F, 0x213A, 
  0x8C46, 0xD573, 0x3E2C, 0x6719, 0xB1A7, 0xE892, 0x03CD, 0x5AF8, 
  0xB63D, 0xEF08, 0x0457, 0x5D62, 0x8BDC, 0xD2E9, 0x39B6, 0x6083, 
  0xCDFF, 0x94CA, 0x7F95, 0x26A0, 0xF01E, 0xA92B, 0x4274, 0x1B41, 
  0x41B9, 0x188C, 0xF3D3, 0xAAE6, 0x7C58, 0x256D, 0xCE32, 0x9707, 
  0x3A7B, 0x634E, 0x8811, 0xD124, 0x079A, 0x5EAF, 0xB5F0, 0xECC5, 
  0x354F, 0x6C7A, 0x8725, 0xDE10, 0x08AE, 0x519B, 0xBAC4, 0xE3F1, 
  0x4E8D, 0x17B8, 0xFCE7, 0xA5D2, 0x736C, 0x2A59, 0xC106, 0x9833, 
  0xC2CB, 0x9BFE, 0x70A1, 0x2994, 0xFF2A, 0xA61F, 0x4D40, 0x1475, 
  0xB909, 0xE03C, 0x0B63, 0x5256, 0x84E8, 0xDDDD, 0x3682, 0x6FB7, 
  0x8372, 0xDA47, 0x3118, 0x682D, 0xBE93, 0xE7A6, 0x0CF9, 0x55CC, 
  0xF8B0, 0xA185, 0x4ADA, 0x13EF, 0xC551, 0x9C64, 0x773B, 0x2E0E, 
  0x74F6, 0x2DC3, 0xC69C, 0x9FA9, 0x4917, 0x1022, 0xFB7D, 0xA248, 
  0x0F34, 0x5601, 0xBD5E, 0xE46B, 0x32D5, 0x6BE0, 0x80BF, 0xD98A, 
  0x6A9E, 0x33AB, 0xD8F4, 0x81C1, 0x577F, 0x0E4A, 0xE515, 0xBC20, 
  0x115C, 0x4869, 0xA336, 0xFA03, 0x2CBD, 0x7588, 0x9ED7, 0xC7E2, 
  0x9D1A, 0xC42F, 0x2F70, 0x7645, 0xA0FB, 0xF9CE, 0x1291, 0x4BA4, 
  0xE6D8, 0xBFED, 0x54B2, 0x0D87, 0xDB39, 0x820C, 0x6953, 0x3066, 
  0xDCA3, 0x8596, 0x6EC9, 0x37FC, 0xE142, 0xB877, 0x5328, 0x0A1D, 
  0xA761, 0xFE54, 0x150B, 0x4C3E, 0x9A80, 0xC3B5, 0x28EA, 0x71DF, 
  0x2B27, 0x7212, 0x994D, 0xC078, 0x16C6, 0x4FF3, 0xA4AC, 0xFD99, 
  0x50E5, 0x09D0, 0xE28F, 0xBBBA, 0x6D04, 0x3431, 0xDF6E, 0x865B, 
  0x5FD1, 0x06E4, 0xEDBB, 0xB48E, 0x6230, 0x3B05, 0xD05A, 0x896F, 
  0x2413, 0x7D26, 0x9679, 0xCF4C, 0x19F2, 0x40C7, 0xAB98, 0xF2AD, 
  0xA855, 0xF160, 0x1A3F, 0x430A, 0x95B4, 0xCC81, 0x27DE, 0x7EEB, 
  0xD397, 0x8AA2, 0x61FD, 0x38C8, 0xEE76, 0xB743, 0x5C1C, 0x0529, 
  0xE9EC, 0xB0D9, 0x5B86, 0x02B3, 0xD40D, 0x8D38, 0x6667, 0x3F52, 
  0x922E, 0xCB1B, 0x2044, 0x7971, 0xAFCF, 0xF6FA, 0x1DA5, 0x4490, 
  0x1E68, 0x475D, 0xAC02, 0xF537, 0x2389, 0x7ABC, 0x91E3, 0xC8D6, 
  0x65AA, 0x3C9F, 0xD7C0, 0x8EF5, 0x584B, 0x017E, 0xEA21, 0xB314
};

uint16_t calculate_crc(const uint8_t *data, size_t length) {
    uint16_t crc = 0xFFFF;
    for (size_t i = 0; i < length; i++) {
        #if 0
        uint8_t idx = (uint8_t)(crc ^ data[i]);
        crc = (crc >> 8) ^ crc_table[idx];
        #else
        uint8_t idx = (uint8_t)((crc >> 8) ^ data[i]);
        crc = (crc << 8) ^ crc_table[idx];
        #endif
    }
    return crc ^ 0x0000;
}

About CRC-16/M17

CRC-16/M17 protects frames in the M17 open digital voice and data radio protocol.

CRC-16/M17 is a 16-bit CRC model defined by polynomial 0x5935, an initial register value of 0xFFFF, and final XOR 0x0000. It uses normal, non-reflected input and output processing.

Documented application context for this model includes M17 protocol, Digital voice radio, Amateur radio. The calculator above applies this exact parameter set to the current input; the published Check value below is instead the fixed verification result for ASCII 123456789.

Standard test vector

CRC implementations are commonly verified with the ASCII input 123456789.

Input format
ASCII
Input
123456789
Expected CRC
0x772B

Model characteristics

A model is identified by its complete parameter set, not its polynomial alone.

Bit order
Normal
Register start
0xFFFF
Final XOR
0x0000
Published check
0x772B

Implementation checks for CRC-16/M17

  • Use a 16-bit register and polynomial 0x5935.
  • Initialize the register to 0xFFFF and use XorOut 0x0000 exactly as listed; changing either value defines a different model.
  • Verify the implementation with ASCII “123456789”; the expected result is 0x772B.

Continue with the main calculator, browse the algorithm catalog, compare models in the Algorithm Reference section, or generate a lookup table.

Complete CRC-16/M17 parameters

CRC parameter guide
ParameterValueMeaningReference
Width16 bitsCRC register and result widthRead guide
Poly0x5935Generator polynomial without the leading termRead guide
Init0xFFFFInitial CRC register valueRead guide
RefInNoReflect each input byte before processingRead guide
RefOutNoReflect the register before XOR OutRead guide
XorOut0x0000Final value XORed with the CRC registerRead guide
Check0x772BCRC of ASCII “123456789”Read guide
ResidueNot listedExpected residue after appending a valid CRCRead guide
AliasesM17 CRC-16

Where CRC-16/M17 is used

  • 01M17 protocol
  • 02Digital voice radio
  • 03Amateur radio

CRC-16/M17 FAQ

What is the check value for CRC-16/M17?

For the standard ASCII test input 123456789, the check value of CRC-16/M17 is 0x772B.

What polynomial does CRC-16/M17 use?

CRC-16/M17 uses the 16-bit polynomial 0x5935.

Does CRC-16/M17 use reflected input and output?

For CRC-16/M17, RefIn is No and RefOut is No.

What is CRC-16/M17 commonly confused with?

CRC-16/OPENSAFETY-A uses the same polynomial (0x5935), which is the usual source of mix-ups — matching the polynomial alone does not reproduce CRC-16/M17. The two models differ in initial value, so a port from one to the other needs those fields checked explicitly, not just the poly.