The STM32429, code name Discovery helps hardware developers to make interactive applications easily, it has everything required for beginners to experience users, it has high performance microcontroller STM32 F4 series from STMicroelectronics base of the STM32F429ZIT6 it has ST-LINK version 2 embedded debug tools and 2.4 QVGA TFT LCD Screen with external SDRM of 64Mbits a gyroscope ST MEMs, USB OTG, Micro-AB Connector, LEDs, and Pushbuttons.
STM32429 Discovery has a large number of free to use, preloaded firmware examples ready to run application such as clock, calendar, games, video player, image browser, performance monitoring, and system information, support only windows operating systems.
The STM32429 IDE
The IAR Embedded Workbench that gives you an uninterrupted workflow single toolbox with the components and thousands of source code examples, it uses C/C++ compiler to generate the fastest performing compact code.IAR IDE its use C-SPY debugger to provides an instruction simulator as well as extensive support for debugging probes and target system.
Download the evaluation here
Official website of the IAR IDE
Sample Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
/*---------------------------------------------------------------------------- * Name: LED.c * Purpose: low level LED functions * Note(s): *---------------------------------------------------------------------------- * This file is part of the uVision/ARM development tools. * This software may only be used under the terms of a valid, current, * end user licence from KEIL for a compatible version of KEIL software * development tools. Nothing else gives you the right to use this software. * * This software is supplied "AS IS" without warranties of any kind. *----------------------------------------------------------------------------*/ #include "STM32F4xx.h" #include "LED.h" const unsigned long led_mask[] = {1UL << 12, 1UL << 13, 1UL << 14, 1UL << 15}; /*---------------------------------------------------------------------------- initialize LED Pins *----------------------------------------------------------------------------*/ void LED_Init (void) { RCC->AHB1ENR |= ((1UL << 3) ); /* Enable GPIOD clock */ GPIOD->MODER &= ~((3UL << 2*12) | (3UL << 2*13) | (3UL << 2*14) | (3UL << 2*15) ); /* PD.12..15 is output */ GPIOD->MODER |= ((1UL << 2*12) | (1UL << 2*13) | (1UL << 2*14) | (1UL << 2*15) ); GPIOD->OTYPER &= ~((1UL << 12) | (1UL << 13) | (1UL << 14) | (1UL << 15) ); /* PD.12..15 is output Push-Pull */ GPIOD->OSPEEDR &= ~((3UL << 2*12) | (3UL << 2*13) | (3UL << 2*14) | (3UL << 2*15) ); /* PD.12..15 is 50MHz Fast Speed */ GPIOD->OSPEEDR |= ((2UL << 2*12) | (2UL << 2*13) | (2UL << 2*14) | (2UL << 2*15) ); GPIOD->PUPDR &= ~((3UL << 2*12) | (3UL << 2*13) | (3UL << 2*14) | (3UL << 2*15) ); /* PD.12..15 is Pull up */ GPIOD->PUPDR |= ((1UL << 2*12) | (1UL << 2*13) | (1UL << 2*14) | (1UL << 2*15) ); } /*---------------------------------------------------------------------------- Function that turns on requested LED *----------------------------------------------------------------------------*/ void LED_On (unsigned int num) { if (num < LED_NUM) { GPIOD->BSRRL = led_mask[num]; } } /*---------------------------------------------------------------------------- Function that turns off requested LED *----------------------------------------------------------------------------*/ void LED_Off (unsigned int num) { if (num < LED_NUM) { GPIOD->BSRRH = led_mask[num]; } } /*---------------------------------------------------------------------------- Function that outputs value to LEDs *----------------------------------------------------------------------------*/ void LED_Out(unsigned int value) { int i; for (i = 0; i < LED_NUM; i++) { if (value & (1<<i)) { LED_On (i); } else { LED_Off(i); } } } |