2085| 1
|
控制小灯,用PA1好使,同样用PA14就不好使,为啥呢? |
1金钱
最佳答案搞定了,PA13-15是jtag引脚,先需要失能
void rt_hw_fan_pin_init(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
//想用PA13-15,RCC_APB2Periph_AFIO必须有
RCC_APB2PeriphClockCmd(fanin_rcc|fanout_rcc|RCC_APB2Periph_AFIO,ENABLE);
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); //失能(JTAG+SW-DP)
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_InitStructure.GPIO_S ...
| ||
自在随心
|
||
| ||
自在随心
|
||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-6-9 17:48
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网