cancel
Showing results for 
Search instead for 
Did you mean: 

STM32l152-VB _Start up

ameno12008
Associate II
Posted on November 14, 2012 at 11:40

Hello,

i need help

When debugging my code ,,there is an infinite loop at start up section,,,although i did all clk configuration

For example

@file    system_stm32l1xx.c

  /* Wait till HSE is ready and if Time out is reached exit */

  do

  {

    HSEStatus = RCC->CR & RCC_CR_HSERDY;

    StartUpCounter++;

  } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));

Is there any opinion for solving this problem?...

Thanks in advance 

#clive1
5 REPLIES 5
Posted on November 14, 2012 at 17:04

Do you have an external crystal, and is it starting?

If it's not starting you'd need to review the component choices, and perhaps the STM32 crystal app note.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ameno12008
Associate II
Posted on November 17, 2012 at 14:19

thank you for your support

Posted on November 22, 2012 at 11:49

I have a similar problem with STM32L152xx

Configuration:

Clock source: MSI

freq.: all MSI freq. (64KHz to 4MHz)

Procedure

- Power on

- the device NOT start...

- manually reset (NRST to GND for ~1 sec  -  from one to three attempts)

- the device start...

Very simple test firmware (schematic):

{

[power-on]

SetSysClock();

ConfigurePortAPin13ForToggle();

while(1);

}

NOTE - in debug-mode with SWD connected the device start normally at any freq. and also with HSE 24MHz

Thanks in advance

Paolo

Posted on November 22, 2012 at 15:24

Is this demonstrable on an STM32L-Discovery board, or is this something else?

Are you using the CMSIS library, which is presumably calling System_Init() prior to calling main()?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on November 22, 2012 at 16:05

1 - No, the problem appear on a little and very simple board developed by us: uC in BGA package (STM32L151R6H6TR) with USB connection and EEPROM (I can send you the schematic or the layout...)

2 - Yes:

LDR     R0, =SystemInit

BLX     R0              

LDR     R0, =__main

BX      R0