cancel
Showing results for 
Search instead for 
Did you mean: 

RCC_WaitForHSEStartUp() in Release Mode

budde2
Associate II
Posted on December 19, 2008 at 05:03

RCC_WaitForHSEStartUp() in Release Mode

1 REPLY 1
budde2
Associate II
Posted on May 17, 2011 at 12:57

I have a strange problem with RCC_WaitForHSEStartUp() of the firmware library.

My setup:

*) STM3210E-EVAL board

*) CrossStudio 1.7 Build 13

*) latest firmware library

In debug mode everything works as expect. In release mode the RCC configuration fails. Even with a long timeout value, RCC_WaitForHSEStartUp() reports an error.

I have found two work-arounds, but I am interested in the reason for this problem:

*) Replace

#define RCC ((RCC_TypeDef *) RCC_BASE)

with

#define RCC ((volatile RCC_TypeDef *) RCC_BASE)

*) Call RCC_WaitForHSEStartUp() in a loop.

Seems to be an optimization problem?