Skip to main content
karouimaroua88
Associate II
April 24, 2013
Question

user button interrupt

  • April 24, 2013
  • 6 replies
  • 1296 views
Posted on April 24, 2013 at 23:43

Hi,

i'm novice in programming with stm32f4 and i want to know how to generate an interrupt after pressing user button what's i know is that i should use EXITx_irqHandler but how to configure the button to be related to the coherent pin that will cause the interrupt ? if you have example i'll be thankfull  
    This topic has been closed for replies.

    6 replies

    Tesla DeLorean
    Guru
    April 24, 2013
    Posted on April 25, 2013 at 01:11

    Like this?

    STM32F4-Discovery_FW_V1.1.0\Project\Peripheral_Examples\EXTI
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    karouimaroua88
    Associate II
    April 24, 2013
    Posted on April 25, 2013 at 01:26

    I tried to integrate it into my code but i got this error:

    Error[Li005]: no definition for ''SYSCFG_EXTILineConfig'' [referenced from ...main.o]

    have you any idea about it ?

    Tesla DeLorean
    Guru
    April 24, 2013
    Posted on April 25, 2013 at 01:36

    Sounds like your unspecified tool chain isn't loading the project correctly. The project needs to include stm32f4xx_exti.c

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    karouimaroua88
    Associate II
    April 25, 2013
    Posted on April 25, 2013 at 21:29

    I added this file from the beginning, but  i just forgot to add  stm32f4xx_syscfg.c .

    thanks for your help 

    Tesla DeLorean
    Guru
    April 25, 2013
    Posted on April 25, 2013 at 21:50

    From the error I'm going to guess you have IAR of some version, again which you fail to mention.

    Why don't you just load the EXTI example workspace and make the thing? It build fine in an IAR EWARM 6.40 evaluation/demo edition.

    0690X00000605SfQAI.png
    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    karouimaroua88
    Associate II
    April 25, 2013
    Posted on April 25, 2013 at 23:13

    it's ok i solved the problem by adding the file ''stm32f4xx_syscfg.c''.

     thanks again