/
main.c
38 lines (33 loc) · 1.17 KB
/
main.c
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
//******************************************************************************
#include "stm32f4xx.h"
#include "stm32f4xx_conf.h"
#include "discoveryf4utils.h"
#include "uart_to_printf.h"
//******************************************************************************
//******************************************************************************
int main(void)
{
/*!< At this stage the microcontroller clock setting is already configured,
this is done through SystemInit() function which is called from startup
file (startup_stm32f4xx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f4xx.c file
*/
uint32_t i = 0;
uint32_t j = 0;
STM_EVAL_LEDInit(LED_BLUE);
STM_EVAL_LEDInit(LED_GREEN);
STM_EVAL_LEDInit(LED_ORANGE);
STM_EVAL_LEDInit(LED_RED);
UART_Configuration();
while(1) /* Infinite loop */
{
STM_EVAL_LEDToggle(LED_BLUE);
STM_EVAL_LEDToggle(LED_GREEN);
STM_EVAL_LEDToggle(LED_ORANGE);
STM_EVAL_LEDToggle(LED_RED);
for(i=0;i<0x00FFFFFF;++i){__NOP();};
printf("j = %i\n",j++);
}
}
//******************************************************************************