CRC-32 using DCP

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

CRC-32 using DCP

959 次查看
gary_metalle
Contributor III

Is it possible to configure the DCP block for different flavours of CRC?

From this link it appears the configuration is:

/* Expected CRC-32 for the message.
     * CRC-32 params:
     * width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0x00000000
     * http://reveng.sourceforge.net/crc-catalogue/
     */

But I would like to use:

width=32 poly=0x04c11db7 init=0xffffffff refin=true refout=true xorout=0xffffffff

Well I say that... I think I do anyway if you follow the reveng link above for the CRC-32/ISO-HDLC variant which is what I already have a software implementation for.

If you run "12345678" through ISO-HDLC you will get a crc of 0x9ae0daaf but when I run it through the DCP I am getting 0xF954FCFE.

There is a 'swapConfig' field in the dcp_handle_t struct that looks promising but people always seem to set it to kDCP_NoSwap and I am not sure what kDCP_InputByteSwap and others are used for.

I've just run a quick test for SHA1 as well and that also doesn't match what I am expecting.

标记 (5)
0 项奖励
回复
1 回复

915 次查看
JasonGT93
Contributor II

Hi Gary,

Did you find some information for this?

I posted similar question in this topic:

https://community.nxp.com/t5/i-MX-Processors/iMXRT1024-DCP-CRC-32-parameter-settings/m-p/1472829#M19...

Unfortunately I did not get any reply.

Best regards.

0 项奖励
回复