在同一块PCB 上 焊接 SMT32F103C8T6 程序运行正常,LED闪烁 Relay 动作 都没有问题的, 焊接上SMT32F100C8T6B 程序没有任何动作,程序不运行,下面是 系统配置函数 ,请高手指教,谢谢!
void GPIO_Config(void)
{
/*******************************Buzzer_LED_Config***********************************/
GPIO_InitTypeDef GPIO_InitStructure;
RCC_APB2PeriphClockCmd(RCC_APB2Periph_AFIO, ENABLE); // 开启 AFIO 时钟
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE); // SWJ 禁止
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB, ENABLE); // 使能端口时钟
GPIO_InitStructure.GPIO_Pin =GPIO_Pin_6|GPIO_Pin_7|GPIO_Pin_8|GPIO_Pin_9;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; //时钟速度为50M
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOB, &GPIO_InitStructure);
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); // 使能端口时钟
GPIO_InitStructure.GPIO_Pin =GPIO_Pin_13;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz; //时钟速度为50M
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOC, &GPIO_InitStructure);
}
|