#define GPIOA_CRL ((volatile unsigned long *)(0x40010800))
#define GPIOA_ODR5 ((volatile unsigned long *)(0x4001080C))
#define RCC_APB2ENR ((volatile unsigned long *)(0x40021018))
int main(void)
{
* (RCC_APB2ENR) |= 0x00000004;
* (GPIOA_CRL) |= 0x00220000;
while(1)
{
*(GPIOA_ODR5) = *(GPIOA_ODR5) | 0x0020;
}
}
各位专家,最近购买NUCLEO-F103RB DEMO板,开始学习ARM,想实现IO口输出高电平点亮LED灯,用KEIL软件下载程序后实验板无高电平输出,测试PA5 引脚确实是低电平,但是用KEIL仿真监控porta ODR里面PA5却有输出,不知是怎么回事?搞了一周,没想到什么原因 |