AN2262 Motorola / Freescale Semiconductor, AN2262 Datasheet - Page 104

no-image

AN2262

Manufacturer Part Number
AN2262
Description
Wireless HC08 Modem
Manufacturer
Motorola / Freescale Semiconductor
Datasheet
AN2262/D
}
/*-------------------------------------------------------------------------------**
**
** The CRC is based on polynom:
**
**
**
**
**
**
**-------------------------------------------------------------------------------*/
int calc_crc(char *buf, unsigned char n)
{
#pragma CONST_SEG ROM_CONST
104
}
static const int
}
0x0000, 0xc0c1, 0xc181, 0x0140, 0xc301, 0x03c0, 0x0280, 0xc241,
0xc601, 0x06c0, 0x0780, 0xc741, 0x0500, 0xc5c1, 0xc481, 0x0440,
0xcc01, 0x0cc0, 0x0d80, 0xcd41, 0x0f00, 0xcfc1, 0xce81, 0x0e40,
0x0a00, 0xcac1, 0xcb81, 0x0b40, 0xc901, 0x09c0, 0x0880, 0xc841,
0xd801, 0x18c0, 0x1980, 0xd941, 0x1b00, 0xdbc1, 0xda81, 0x1a40,
0x1e00, 0xdec1, 0xdf81, 0x1f40, 0xdd01, 0x1dc0, 0x1c80, 0xdc41,
0x1400, 0xd4c1, 0xd581, 0x1540, 0xd701, 0x17c0, 0x1680, 0xd641,
0xd201, 0x12c0, 0x1380, 0xd341, 0x1100, 0xd1c1, 0xd081, 0x1040,
0xf001, 0x30c0, 0x3180, 0xf141, 0x3300, 0xf3c1, 0xf281, 0x3240,
0x3600, 0xf6c1, 0xf781, 0x3740, 0xf501, 0x35c0, 0x3480, 0xf441,
0x3c00, 0xfcc1, 0xfd81, 0x3d40, 0xff01, 0x3fc0, 0x3e80, 0xfe41,
0xfa01, 0x3ac0, 0x3b80, 0xfb41, 0x3900, 0xf9c1, 0xf881, 0x3840,
0x2800, 0xe8c1, 0xe981, 0x2940, 0xeb01, 0x2bc0, 0x2a80, 0xea41,
RF_Init(romeoCfgOff);
TBM_Disable();
RF_SendBuff(SCI_RxPoll(RF_TxBuff+1, SCI_RxLen())+1);
while (rfTxActive)
{/* do nothing & wait for data to be transmitted
TBM_Enable();
RF_Init(romeoCfg);
SciRx_On();
LedGreenOff();
LedRedOff();
RF_RxStart();
don’t let be disturbed by ANY sci int or another int */};
X
16
See also 4. “A Tutorial on CRC Computations”
article in IEEE Micro magazine, August 1988
+ X
15
+ X
crc_table[] = {
2
+ 1
Wireless HC08 Modem
// start RF RX after TX ready!
MOTOROLA
**
**
**
**
**
**
**
**

Related parts for AN2262