13 lines
403 B
Mathematica
13 lines
403 B
Mathematica
![]() |
function scrData = TX_CRC32_Scramble(dataPacketBits)
|
||
|
poly = [32,26,23,22,16,12,11,10,8,7,5,4,2,1,0];
|
||
|
crcGen32 = comm.CRCGenerator(...
|
||
|
'Polynomial', poly, ...
|
||
|
'InitialConditions', 1, ...
|
||
|
'DirectMethod', true, ...
|
||
|
'FinalXOR', 1);
|
||
|
dataPacket = crcGen32(dataPacketBits);
|
||
|
|
||
|
scrambler = comm.Scrambler(2,[1 0 0 0 0 0 1 0 1], ...
|
||
|
zeros(8,1));
|
||
|
scrData = scrambler(dataPacket);
|
||
|
end
|