stm32f103 led 闪烁的电路图和代码,STM32 学习资源

/* Main.c file generated by New Project wizard
 *
 * Created:   周六 7月 11 2020
 * Processor: STM32F103C4
 * Compiler:  GCC for ARM
 */
// Refer to 教程 https://www.bilibili.com/video/BV1Kb411y7BU?p=9
#include <stm32f1xx.h>
//0x4001 0C00
#define GPIOB_MODER *(unsigned int*)(0x40010C00)
#define GPIOB_ODR *(unsigned int*)(0x40010c0c)
#define CLOCKENABLE  *(unsigned int*)(0x40021018)
extern int add(int ,int );
int main (void)
 { 
   // Write your code here
	CLOCKENABLE |= (1<<3) ;
	GPIOB_MODER |= 1 ; 
	
   while (1){
	   GPIOB_ODR &= (~1);//0xfffffffe;
		int delay = 0x7ffff;
		while( delay -- > 0) ;
		GPIOB_ODR |= 1;
		delay = 0x7ffff;
		while( delay -- > 0) ;
		
   }
      ;
   return 0;
 }   

STM32 学习资源:
https://www.bilibili.com/video/BV1Kb411y7BU?p=5 ,STM32 介绍 
https://blog.csdn.net/weixin_43071664/article/details/104160705 ,介绍使用STM32CubeIDE 编译出Hex,在Proteus中仿真。
STM32CubeIDE编译出的Hex在I:\stm32prj\stm32prj1\STM32F103C4\Debug
https://www.cnblogs.com/sdmpy/p/5081827.html ,关于通过串口下载代码到板子
辽宁大学linux操作系统2020 :https://www.bilibili.com/video/BV1uE411W7pV?p=11

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值