cancel
Showing results for 
Search instead for 
Did you mean: 

Prolong the startup time to delay the check of the Boot0 pin

russ
Associate II
Posted on October 10, 2008 at 08:59

Prolong the startup time to delay the check of the Boot0 pin

6 REPLIES 6
russ
Associate II
Posted on May 17, 2011 at 12:47

I have a circuit which puts the system into Boot mode by inverting an input on the Boot0 pin. When I first plug in the system this circuit is momentarily high, resulting in a triggering of the bootloading state. I am trying to avoid addressing the issue in the inversion circuit because it will require a hardware revision. Is there a way to make the system take longer to look at the Boot0 pin after a reset condition? I know on other microprocessers I have worked with there are settings for the power on reset stabilization time. I assume some of this is handled in the RCC setup, but I don’t know exactly what to change that will work. Your input on this matter is greatly appreciated. Below is my RCC_Configuration. Note: the clock is running at 72MHz.

void RCC_Configuration(void)

{

/* RCC system reset(for debug purpose) */

RCC_DeInit();

/* Enable HSE */

RCC_HSEConfig(RCC_HSE_ON);

/* Wait till HSE is ready */

HSEStartUpStatus = RCC_WaitForHSEStartUp();

if(HSEStartUpStatus == SUCCESS)

{

/* Enable Prefetch Buffer */

FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);

/* Flash 2 wait state */

FLASH_SetLatency(FLASH_Latency_2);

/* HCLK = SYSCLK */

RCC_HCLKConfig(RCC_SYSCLK_Div1);

/* PCLK2 = HCLK */

RCC_PCLK2Config(RCC_HCLK_Div1);

/* PCLK1 = HCLK/2 */

RCC_PCLK1Config(RCC_HCLK_Div2);

/* PLLCLK = 8MHz * 9 = 72 MHz */

RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);

/* Enable PLL */

RCC_PLLCmd(ENABLE);

/* Wait till PLL is ready */

while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)

{

}

/* Select PLL as system clock source */

RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);

/* Wait till PLL is used as system clock source */

while(RCC_GetSYSCLKSource() != 0x08)

{

}

}

}

andreas2
Associate II
Posted on May 17, 2011 at 12:47

Messing with the RCC configuration will hardly help since if the bootloader is triggered, that code will never execute.

russ
Associate II
Posted on May 17, 2011 at 12:47

Yeah. You are right. There has to be some hardware bytes that can be set to change the delay time, right?

Does anybody here use supervisor circuits on the Vdd input?

lanchon
Associate II
Posted on May 17, 2011 at 12:47

> There has to be some hardware bytes that can be set to change the delay time, right?

no, this is modern cpu that always wakes up with it's trusty internal oscillator. no need for non-volatile configurations for crystals; that's done in software.

paulsmitton9
Associate II
Posted on May 17, 2011 at 12:47

If a soft reset will cause the boot pins to be scanned (i'm not sure if it does or not) then perhaps you could program a delay on boot-up, and then force a reset if the backup registers are not set to some particular value.

lanchon
Associate II
Posted on May 17, 2011 at 12:47

it boots into the bootloader, he can't do anything in software. he could just add a capacitor on the reset line, or do a similarly simple change to the boot pin driver (like maybe adding a cap to ground too), but he has to do something to the hardware.