Blinky code for STM32F429I-DISC1

#include "stm32f4xx.h"
			
void myDelay(int value)
{
	while(value>0)
		value--;
}

int main(void)
{
	RCC->AHB1ENR |= RCC_AHB1ENR_GPIOCEN;

	//pc2 output mode
	GPIOC->MODER |= GPIO_MODER_MODER2_0;

	while(1)
	{
		GPIOC->ODR |=  GPIO_ODR_ODR_2;

		myDelay(500000);

		GPIOC->ODR &= ~GPIO_ODR_ODR_2;

		myDelay(500000);
	}
}

About PraveenMax
My Interests: ------------------ Programming , Drawing & Music

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: