AnsweredAssumed Answered

STM32_F103VE RCC_CR write issue

Question asked by ben.fang on Oct 17, 2015
Latest reply on Oct 19, 2015 by ben.fang
I am working on a project using internal clock though PLL as system clock,here is the issue:

1.HSI is 8MHz.
2.System is programmed to wake and sleep in 1 second period (Stop mode, using WFI), which is waked by RTC alarm.
3.Every time,when system is wakened, system calls function "SetSysClock" to setup HSI through PLL as system clock, and then do the job.
4.The problem is: After 512 seconds (512 times sleep and wake), system is down fault without any cause, and any reset both hardware and software are uneffective.

I tracked the program to the line  "RCC->CR |= ((uint32_t)RCC_CR_HSEON)"
It seems after this line is called 512 times, the "RCC_CR_HSERDY" bit is set, but the system does not even has a external crystal clock at all.

I commented "RCC->CR |= ((uint32_t)RCC_CR_HSEON)", system works fine.

I already checked every erra sheet, it does not give any helpful info.

Could somebody helps me out?

   

Outcomes