RST引脚如何复用成普通IO

[复制链接]
 楼主| 东方教主 发表于 2024-11-30 13:12 | 显示全部楼层 |阅读模式
LKS07 RST手册上可以复用成P0.2,配置了复用寄存器,实际控制IO翻转没效果;还需要配置其他寄存器么SYS_IO_CFG |= BIT5; //RST config P0.2

MYWX 发表于 2024-12-2 13:55 | 显示全部楼层
检查是不是配置成功,是不是开启了写保护,没有配置进去
玉树临风小黑龙 发表于 2024-12-2 15:12 | 显示全部楼层
需要配置,IO要先复用成普通IO口,默认是RST功能
guijial511 发表于 2024-12-2 18:46 来自手机 | 显示全部楼层
RST引脚都复用了,为什么不选个引脚多一点的型号。
probedog 发表于 2024-12-5 14:01 | 显示全部楼层
复用功能寄存器配置有误吧
classroom 发表于 2024-12-5 14:01 | 显示全部楼层
检查IO配置是否有误
laocuo1142 发表于 2024-12-5 14:02 | 显示全部楼层
检查输出控制及外部电路
powerantone 发表于 2024-12-5 14:03 | 显示全部楼层
看看错误日志或调试信息
flycamelaaa 发表于 2024-12-5 15:03 | 显示全部楼层
电源不稳定或接地不良
suncat0504 发表于 2024-12-18 16:20 | 显示全部楼层
我的天,这样改,在运行的时候,会不会出问题?
suncat0504 发表于 2024-12-18 16:21 | 显示全部楼层
拓展端口可以使用别的方式啊,使用复位端口的复用,有感觉有点不安全。
江南星语 发表于 2024-12-27 09:08 | 显示全部楼层
          GPIO_InitTypeDef GPIO_InitStruct;
    GPIO_StructInit(&GPIO_InitStruct);
       
          SYS_WR_PROTECT = 0x7a83;
       
          SYS_IO_CFG |= BIT5;//bit5置1     RST功能:SYS_IO_CFG.bit5 = 0   GPIO功能:SYS_IO_CFG.bit5 = 1
       
                SYS_WR_PROTECT = 0;
                #if 0
                        //IN
                        GPIO_InitStruct.GPIO_Mode = GPIO_Mode_IN; /*GPIO输入模式*/
                        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;     /*Pin2*/
                        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;  /*上拉功能*/  //上拉100kΩ
                        GPIO_Init(GPIO0, &GPIO_InitStruct);
            //如果要使用外部中断 可加入 EXTI_Trigger_Config()
                #else
                        //OUT
                        GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT; /*GPIO输出模式*/
                        GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2;     /*Pin2*/
                        GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_UP;  /*上拉功能*/   //上拉100kΩ
                        GPIO_Init(GPIO0, &GPIO_InitStruct);

                #endif
您需要登录后才可以回帖 登录 | 注册

本版积分规则

1

主题

17

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部