cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F107 CRC not working...

stforum23
Associate II
Posted on June 26, 2012 at 00:29

Hi all,

I'm trying to use the CRC module in a STM32F107 using IAR EW and I'm not getting very far. I'm using the standard stm32f10x_crc.c library but looking in the debugger, any writes to CRC_DR or CRC_CR are being ignored and the registers are just showing zeros.

Anybody come across anything similar? I'm sure it is something silly I'm doing wrong. However it is difficult to go wrong when your code is just the following:

CRC_ResetDR();

4 REPLIES 4
Posted on June 26, 2012 at 01:39

  /* Enable CRC clock */

  RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
stforum23
Associate II
Posted on July 02, 2012 at 19:42

Thanks Neo.

Simple when you know what you are doing. Pity it isn't mentioned in the CRC section of the manual..

stforum23
Associate II
Posted on July 02, 2012 at 19:42

.

Posted on July 02, 2012 at 20:32

Simple when you know what you are doing. Pity it isn't mentioned in the CRC section of the manual..

Isn't everything?

The examples in the firmware library, which while often not ideal, do provide a different perspective on the hardware.

There are some other threads on the CRC unit. They made a number of poor choices in the design (32-bit only, not endian appropriate, etc). To be honest I can't see why it would even need it's own clock, I've built hardware CRC generators that function off a single latching clock, it isn't that hard.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..