CRC Component | Cypress Semiconductor
For several reasons, I have to calculate the CRC of a large array,1024 Bytes, as quickest way possible, so...
I had read a little bit of how to get the CRC value, using the fastest way. And of course I read: A painless guide to CRC error detection Algorithms, from Ross N. Williams, just to comprehend what is happening in the CRC calculation procedure. I am using a table based method, with the simple CRC-16-USB poly, courtesy of PyCRC Generator; Nevertheless, this method is still slow for a high speed interrupt system that I am planning implement.
So right now, I search example projects of the CRC component in PSoC 4 Forums, but there are too few examples. What I understand about this component is that you need a serial input and a data clock in order to get the CRC component to read the bits from your data Byte, or all the bits of the array on this case. So I am using a SPI Master digital component, just to send fast the data from the firmware to the CRC component, first using the SPI Master API: SPIM_PutArray();, and then I checkinf the CRC value using: CRC_ReadCRC() API ;. Finally I compare the software table driven CRC and the Hardware Method CRC. But the hardware method is wrong, and is worst the CRC value is changing every time I read it... I think that I am making several mistakes in the SPI send configuration, or maybe I am misunderstanding some of the CRC parameters configuration.
I would thank any advice that you can bring me...
P.S. I am attaching my example project.