Posted on January 24, 2013 at 20:37Ok attempt number 4: In my final application I have to implement a external interrupt on PA14 of a
STM32F051K6 to wake from sleep. Using the NVIC WFI mode example on a STM32F0-Discovery board I implement the function but cant debug because of the SWCLK function that shares this pin. All well and good but in ''release build'' the EXTI interrupt doesn't seem to fire. Do I have to disable SWI somehow? Is this even possible?
Ok attempt number 4: In my final application I have to implement a external interrupt on PA14 of aSTM32F051K6 to wake from sleep. Using theNVIC WFI mode example on a STM32F0-Discovery board I implement the function but cant debug because of the SWCLK function that shares this pin. All well and good but in ''release build'' the EXTI interrupt doesn't seem to fire. Do I have to disable SWI somehow? Is this even possible?
I think the way to disable SWD is to reconfigure the GPIO's off the AF setting, presumably you're setting them up as inputs?
As a blind stab, it should probably look like this
That is how I configure the pin and EXTI. Is the sequence of any importance? I have functions that Setup RCC then GPIOs and so on. I'll build a program with just the EXTI config and see where that gets me. Cheers EDIT: After no luck with the EXTI only code I released that it could be switch bounce. Added a RC to my test switch and Bobs my uncle. To recap, setup PIN PA14 for EXTI as you would any other PIN (see clive1's post). This will disable the SWI at run time. A big thanks to clive1 for easing the calm! Cheers
Will the functionality of EXTI change if pull ups/downs are enabled in the pin configuration? Or will EXTI still function with pull ups/downs? All the examples I've seen don't use pull ups/downs. Is there a reason for that?