Skip to main content
Visitor II
October 21, 2014
Question

STLUX 385 - GPIO interrupt.

  • October 21, 2014
  • 2 replies
  • 845 views
Posted on October 21, 2014 at 11:25

Hi,

I have problem with gpio interrupt. I am trying configure and enable interrupt by calling function GPIO_Init(GPIO0, GPIO_PIN_0, GPIO_MODE_IN_FL_IT) but without success.

In interrupt handler function INTERRUPT_HANDLER(PORT2_IRQHandler,5)

I am calling GPIO_WriteReverse(GPIO0, GPIO_PIN_2) and it is not working. When I put GPIO_WriteReverse(GPIO0, GPIO_PIN_2) in main loop, it works and PIN_2 is toggled. So I configured PIN_2 correctly.

In STM8 I found EXTI_SetExtIntSensitivity(...) function. It has not representation in stlux library.

Do you have any idea why INTERRUPT_HANDLER(PORT2_IRQHandler,5) not occur? How I must to do the correct configuration?
    This topic has been closed for replies.

    2 replies

    Visitor II
    October 23, 2014
    Posted on October 23, 2014 at 10:16

    Do you know where I can find example with external interrupt for stlux385a? I have some examples but they are not include external interrupt, only adc, comparators etc.

    I tried use P2 port (digin) but I do not know where I can enable interrupt and where I can choose rising or falling edge. I do not find this information in datasheet.

    Please any help.

    Visitor II
    October 23, 2014
    Posted on October 23, 2014 at 11:52

    I resolve my problem. Everything with port 2 interrupt are configurable by SMED configurator.