AnsweredAssumed Answered

stm32f405 not running

Question asked by Angelo Dureghello on Mar 14, 2014
Latest reply on Mar 14, 2014 by Clive One
Dear all,

i am trying some initial code on a
stm32f405 that i could finally program.

First thing i was wandering is if i can run (for test) straight with the internal HSI 16Mhz.

Init code is from std stm32 library.

I try to debug with a square wave, but i don't see nothing with scope still.

void gpio_init ()
{
        GPIO_InitTypeDef io = {0};

        //
        // Initialise RCC (reset and clock control) to set clock to
        // the peripheral (port A).
        //
        RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);

        io.GPIO_Pin = GPIO_Pin_4;
        io.GPIO_Mode = GPIO_Mode_OUT;
        io.GPIO_Speed = GPIO_Speed_25MHz;
        io.GPIO_OType = GPIO_OType_PP;
    io.GPIO_PuPd = GPIO_PuPd_NOPULL;
        GPIO_Init(GPIOA, &io);

        while (1)
        {
                GPIOA->BSRRL = GPIO_Pin_4;
                GPIOA->BSRRH = GPIO_Pin_4;
        }
}

every help is appreciated.

Outcomes