4596| 3
|
STM32F103RCT6的PA13引脚变为IO的方法,求原子哥指导。 |
1金钱
最佳答案给你一个可用的:
[mw_shl_code=c,true]
#include "stm32f10x.h" // Device header
int main(void)
{
uint32_t i;
for (i = 0; i < 5000000; i++);
RCC->APB2ENR |= (RCC_APB2ENR_IOPAEN|RCC_APB2ENR_AFIOEN);
AFIO->MAPR &= ~AFIO_MAPR_SWJ_CFG;
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;
GPIOA->CRH &= ~(GPIO_CRH_CNF13|GPIO_CRH_CNF14 ...
| ||
| ||
坚决不用寄存器,拒绝重复造轮子。
|
||
| ||
| ||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-6-20 13:25
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网