Associate
July 1, 2015
Question
STM32F030R8T6 Help me to Start
- July 1, 2015
- 7 replies
- 2018 views
Posted on July 01, 2015 at 15:53
Im a newbe to arm family
Im using coocox ide.I create my 1st project compile n and downloaded to STM32F030-Discovery board.The project compiled successfully and downloaded but nothing is happening on the board.What Iam Trying is Just To Turn On The LED.Below Is My Code Pls Guide Me What Iam Missing.&sharpinclude <stm32f0xx_gpio.h>&sharpinclude <stm32f0xx_rcc.h>GPIO_InitTypeDef Gp; //Create GPIO struct//Define LED pins&sharpdefine GreenLED_Pin GPIO_Pin_9&sharpdefine BlueLED_Pin GPIO_Pin_8&sharpdefine LED_GPIO GPIOCint main(void){ RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE); Gp.GPIO_Pin = GreenLED_Pin; //My alteration Gp.GPIO_Mode = GPIO_Mode_OUT; //Set GPIO pins as output Gp.GPIO_OType = GPIO_OType_PP; //Ensure output is push-pull vs open drain Gp.GPIO_PuPd = GPIO_PuPd_NOPULL; //No internal pullup resistors required Gp.GPIO_Speed = GPIO_Speed_Level_1; //Set GPIO speed to lowest GPIO_Init(LED_GPIO, &Gp); //Assign struct to LED_GPIO while(1) { GPIO_SetBits(LED_GPIO, GreenLED_Pin); }}Thank you #stm32f030r8t6-disco-beginner #keil5-stm32f030-l6320w