CRC from partial calculations

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CRC from partial calculations

1,343 Views
juanabelaira
Contributor III

Hello, I need to reckon the CRC of a long file in an external SPI memory so I take blocks into RAM and calculate their partial CRCs with the functions in LpcOpen library. I couldn't find how to obtain the total CRC, can anyone point me in the right direction? Thanks.

Labels (1)
Tags (1)
0 Kudos
6 Replies

801 Views
martinlorenz
Contributor II

I think you have to implement the crc function manually, because you will need access to the internal state of the crc polynomial which must be handed from one block of data to the next one.

0 Kudos

801 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Juan Abelaira,

Thank you for your interest in NXP Semiconductor products and 
the opportunity to serve you.
I was wondering if you can tell me the chip you used.
Have a great day,

TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

801 Views
juanabelaira
Contributor III

LPC1518

0 Kudos

801 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Juan Abelaira,

In the LPCOpen library of the LPCXpresso LPC1549, the crc demo has exemplified the CRC engine for 8-bit, 16-bit, and
32-bit CRC computation, please refer to the demo for details.

Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

801 Views
juanabelaira
Contributor III

That example (if we are talking about the same) takes the CRC of a limited and complete set of data. It doesn't help with my problem, as it is different. I'll state it again: My data to calculate the CRC is only available in blocks because it's larger than the MCU's RAM. So I take, let's say, 4 KB, calculate a partial CRC, read the next 4KB block and so on. 

0 Kudos

801 Views
June
Contributor I

Hi Juan,

Did you manage to get it to work? Can you share your working code?

Thanks. 

0 Kudos