void GPIO_NRST_SEL_PA0_Config(void)
{
// GPIO_InitTypeDef GPIO_InitStructure;
// RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_IOMUX,ENABLE);
GPIOMUX->NRST_PIN_KEY = (uint32_t)(0x00005AE1); //KEY
GPIOMUX->PKG_PIN_SEL &= (uint32_t)(0xFFFFFFFE); //NRSTPA0_PIN_SEL = 0
GPIOMUX->NRST_PIN_KEY = (uint32_t)(0x00005AE1); //KEY
GPIOMUX->NRST_PA0_SEL |= (uint32_t)(0x00000001); //NRST_PA0_SEL = 1
// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; //PA0-NRST_OUTPUT
// GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
// GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;
// GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
// GPIO_Init(GPIOA, &GPIO_InitStructure);
// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; //PA0-NRST_INPUT
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0;
// GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
// GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
// GPIO_Init(GPIOA, &GPIO_InitStructure);
// RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOD, ENABLE);
// GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT; //PD7-VCAP Can only be used for output !
// GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
// GPIO_InitStructure.GPIO_Pin = GPIO_Pin_7;
// GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;
// GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
// GPIO_Init(GPIOD, &GPIO_InitStructure);
} |