stm32f405 not running
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-03-13 4:33 PM
Posted on March 14, 2014 at 00:33
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.
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-03-13 6:50 PM
Posted on March 14, 2014 at 02:50
So the code doesn't look bad, so this perhaps would be the point where you fire up your debugger and step into the code, and evaluate if it gets to your while loop.
You could try one of the examples, using a standard tool chain, and perhaps an ST-LINK STM32F4xx_DSP_StdPeriph_Lib_V1.3.0\Project\STM32F4xx_StdPeriph_Examples\GPIO\GPIO_IOToggle
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
