2008-03-25 11:20 PM
CRC calculation unit
2011-05-17 03:26 AM
Hello!
I've just found in the datasheet some hints regarding a crc calculation unit. But I miss the details about it. As far as I understand the information in the overview, I suspect there is some support to calculate a checksum of a series of 32-bit words and thus support checksum verification of selected data. I assume there is some kind of function or interface that is given the current data and returns the calculated checksum. I've checked the documents but couldn't find:2011-05-17 03:26 AM
see;-
http://www.st.com/stonline/products/support/micro/files/um0427.zip
. Specifically; \STM32f10xFWLib\FWLIB\examples\SPI\Example3 ; Section3 STM32F10xxx Full duplex SPI-SPI comms with CRC transfer. Section 18.4.4 SPI CRC Polynomial Rgeister: SPI_CRCPR offset 0x10 and also Section 18.4.5 SPI RXCRCR, Section 18.4.6 SPI_TXCRCR - CRC used is (by default) 16bit CCITT CRC. Section 18.4.5 RM0008. - Invoke by setting bit CRCEN in SPI_CR1. Section 18.4.1 RM0008. - Initialise by clearing then setting SPE in SPI_CR1.Section 18.4.1 RM0008. The SPI has a CRC generator/checker, the UART does not!:-Y [ This message was edited by: bobz on 17-03-2008 16:23 ]2011-05-17 03:26 AM
I2C also has an 8-bit CRC
2011-05-17 03:26 AM
I did a google search for 13587.pdf, 1st hit was V5.0 march data sheet here
http://www.st.com/stonline/products/literature/ds/13587.pdf Looks like it hasnt filtered down to the Cortex Literature page yet.2011-05-17 03:26 AM
Thanks for your replies :D
Sorry, it seems my question wasn't too clear. I've seen there are several CRC-components attached to communication ports (I2C,SPI,USB). But as far as I understand these are hardwired to the communication port. My question refers to the recently released datasheet(13587.pdf, Rev 5, March 2008)Quote:
CRC (cyclic redundancy check) calculation unit
The CRC (cyclic redundancy check) calculation unit is used to get a CRC code from a 32-bit data word and a fixed generator polynomial. Among other applications, CRC-based techniques are used to verify data transmission or storage integrity. In the scope of the EN/IEC 60335-1 standard, they offer a means of detecting errors in a so-called non-volatile memory (here a Flash memory). The CRC calculation unit helps compute a signature of the software during runtime, to be compared with a reference signature generated at link-time and stored at a given memory location.This CRC unit seems not to be embedded in some communication port as the others are. It's purpose is to check integrity of programmed data in memory. Is there somewhere more information about how to use this feature? Regards Mike2011-05-17 03:26 AM
..er can you post a link to this revision 5 document. It seems that only revision 4 is available here
Thanks. :D2011-05-17 03:26 AM
Actually the link
does link to the Googled revision 5 but the link is decribed as revision 4 - so we might be forgiven for not noticing it has been updated. Maybe the answer to the original question will soon be forthcomming in a matching new revision of the Flash Programming reference here;-That would be a revision greater than 2. But watch out for the April 1st edition. :o 2.0 [ This message was edited by: bobz on 18-03-2008 23:31 ]2011-05-17 03:26 AM
great! I love working with outdated docs, it makes this otherwise dull work much more fun and challenging!
yep, new peripheral at 0x40023000. I doubt we have it in our hardware though. must be a last minute change to conform with some kind of ''safety'' standard.2011-05-17 03:26 AM
Dear all,
As you have presumed, We have added a new general purpose HW CRC calcultaion unit feature in our documentation and is already existing in STM32 silicon to enhance safety and Code/Program checking inside Flash or RAM to check the integrity and inrease the protection level of the code and avoid you implementing it by Firmware with minimum SW overhead : The CRC (cyclic redundancy check) calculation unit is used to get a CRC code from a 32-bit data word and a fixed generator polynomial : This feature will be described in details in our Next release of Reference Manual (RM0008) and how to use it in your final applications. The CRC calculation unit helps compute a signature of the software during runtime, to be compared with a reference signature generated at linktime ( Bootloader or IAP , Tools, etc..) and stored at a given memory location in Flash for example. Cheers, STOne-32