【STM32F429开发日志】+hello led(闪烁led灯)
拿到 STM32F429 Discovery kit 有一周了,万事开头难,现在启动单片机界的第一个 hello world 程序 也就是 hello led(闪烁led灯)迈开探索429的第一步。
0) 用usb type A to mini B 线连接电脑和班子上的USB ST-LINK
1)下载stsw-stm32138.zip 解压出 E:\stf429\STM32F429I-Discovery_FW_V1.0.1\Projects
2)用keil 打开E:\stf429\STM32F429I-Discovery_FW_V1.0.1\Projects\Template\MDK-ARM下面的模板工程Template.uvproj
3)在main.c中添加代码如下:
void Delay(__IO uint32_t nTime)
{
while(--nTime != 0);
}
/**
* @brief Main program
* @param None
* @retval None
*/
int main(void)
{
/*!< At this stage the microcontroller clock setting is already configured,
this is done through SystemInit() function which is called from startup
files (startup_stm32f429_439xx.s) before to branch to application main.
To reconfigure the default setting of SystemInit() function, refer to
system_stm32f4xx.c file
*/
/* Add your application code here */
STM_EVAL_LEDInit(LED4);
/* Infinite loop */
while (1)
{
STM_EVAL_LEDToggle(LED4);
Delay(1900000);
}
}
4)Project 菜单Bulid 编译,Debug菜单启动调试(start debug session ) 点run 运行程序。
5)led 开始闪烁。
如不能正常下载运行程序注意如下设置 Options for Target ‘Template'
回复:【STM32F429开发日志】+hello led(闪烁led灯)
沙发回复:【STM32F429开发日志】+hello led(闪烁led灯)
:):):DRE:【STM32F429开发日志】+hello led(闪烁led灯)
要看看,:)RE:【STM32F429开发日志】+hello led(闪烁led灯)
:):):):):):):):):):):):)好RE:【STM32F429开发日志】+hello led(闪烁led灯)
:):):):):):):):):):):):)好RE:【STM32F429开发日志】+hello led(闪烁led灯)
:):):):):):):):):):):):)好RE:【STM32F429开发日志】+hello led(闪烁led灯)
:lol感谢RE:【STM32F429开发日志】+hello led(闪烁led灯)
下载出错了。。:funk:RE:【STM32F429开发日志】+hello led(闪烁led灯)
hao;P
页:
[1]
2