将JTAG有关的管脚禁止,并配置为模拟输入的模式,整个的系统电流就降到36微安,
STM32加其它外围器件到这个水平,这就可以了,问题基本解决!!!!!!!!!!
配置如下:
GPIO_PinRemapConfig(GPIO_Remap_SWJ_Disable, ENABLE);
/* Configure PA.13 (JTMS/SWDAT), PA.14 (JTCK/SWCLK) and PA.15 (JTDI) as
GPIO_Mode_AIN; */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
GPIO_Init(GPIOA, &GPIO_InitStructure);
/* Configure PB.03 (JTDO) and PB.04 (JTRST) as GPIO_Mode_AIN; */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3 | GPIO_Pin_4;
GPIO_Init(GPIOB, &GPIO_InitStructure);
也能再次下载程序 !!!!
感谢大家的关心和支持,共同学习,共同提高。
|