2015-08-14 02:17 AM
Hello,
Kindly guide me to resolve this.I have a board having STM32F429 on it. while adding new requirements in the board, a situation has arised such that i am left with no option other than to use port pin PA15 for External Interrupt. PA15 default function is for JTAG.I tried following code to init port PA15 to use as External Interrupt but i observed that after running the code, Voltage level on port pin remain high (3.3V). I tested the circuit after disconnecting from the port pin, Found, that circuit works fine. It toggles between 3.3V and 0V, if the input to circuit toggles. But as i connect it to port pin, it remains high and does not toggle as expected.The init code is as follows. Please guide me where i have done mistake.void EXTILine15_Config(void){ EXTI_InitTypeDef EXTI_InitStructure; GPIO_InitTypeDef GPIO_InitStructure; NVIC_InitTypeDef NVIC_InitStructure; /* Enable GPIOA clock */ RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); /* Enable SYSCFG clock */ RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE); GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN; GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; GPIO_InitStructure.GPIO_Pin = GPIO_Pin_15; GPIO_Init(GPIOA, &GPIO_InitStructure); /* Connect EXTI Line15 to PA15 pin */ SYSCFG_EXTILineConfig(EXTI_PortSourceGPIOA, EXTI_PinSource15); /* Configure EXTI Line15 */ EXTI_InitStructure.EXTI_Line = EXTI_Line15; EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; EXTI_InitStructure.EXTI_LineCmd = ENABLE; EXTI_Init(&EXTI_InitStructure); /* Enable and set EXTI Line15 Interrupt to the lowest priority */ NVIC_InitStructure.NVIC_IRQChannel = EXTI15_10_IRQn; NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0x0F; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure); }I want port pin PA15 to work as External interrupt.thanks. #stm32f4 #external-interrupt #jtag