uniwsns 发表于 2023-11-16 08:13

MM32SPINEBK如何将BOOT0做为普通io

MM32SPINEBK芯片想使用BOOT0为普通io输出,普通初始化不行,设置复用也不对,该如何初始化,有没有大神支招一下。

laocuo1142 发表于 2023-11-16 14:49

1.配置BOOT0引脚为GPIO输出模式
2.设置BOOT0引脚的输出值

uniwsns 发表于 2023-11-17 09:05

    void Bsp_Led_Init(void)
{GPIO_InitTypeDef GPIO_InitStructure;

    GPIO_StructInit(&GPIO_InitStructure);
    RCC_AHBPeriphClockCmd(RCC_AHBENR_GPIOD, ENABLE);
    GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8;
    GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
    GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
    GPIO_Init(GPIOD, &GPIO_InitStructure);
}初始化后,将PD8管脚置高置低,没有反应。普通的初始化看来不行

chenqianqian 发表于 2023-11-22 08:36

配置复用成普通IO

Henryko 发表于 2023-11-27 11:06

复用一下就可以了
页: [1]
查看完整版本: MM32SPINEBK如何将BOOT0做为普通io