cancel
Showing results for 
Search instead for 
Did you mean: 

exti1 interrupt works not fine....

ssooki
Associate III

Hi

I am developing a product using stm32f429.

case 1>

- use cmsis_rtos2

- Interrupt is generated every 20ms using exti1(PA1).

- In exti1 callback function, execute gpio is set > delay 1ms > reset.

case 2 >

- case1 + fmc initialize code

case 1 works fine.

However, if you put the fmc initialization code(case 2)

the Interrupts occur irregularly.

Can the behavior of fmc and exti affect each other?

​Or is there another way to get exti1 to work properly?

--------------------------------------------------------------------------------------------

9 REPLIES 9
Pavel A.
Evangelist III

> In exti1 callback function, execute gpio is set > delay 1ms > reset.

EXTI callback function is an interrupt handler.

You don't want to delay in interrupt handlers.

-- pa

S.Ma
Principal

Unless FMC triggers higher priority interrupts or there are glitches on the EXTI line which causes lots of unepexted interrupts, it should be ok.

As Pavel said, interrupts and related callbacks must be as brief as possible.

ssooki
Associate III

Modified the exti function to only execute gpio toggle.

Photo 1 is the interrupt operation to be implemented. (Toggled for each falling edge.)

The second picture is case2.

The data is changing within a short period of time as if some data was being transmitted.

<1>0693W000001tFHQQA2.jpg

< 2 >0693W000001tFHaQAM.jpg

By enabling FMC you added noise and exti triggers on that.

JW

Nikita91
Lead II

It is clear that there is noise around the trigger threshold of exti.

The exti1 signal must have much steeper edges.

ssooki
Associate III

I did some more tests. Below are the conclusions from the tests.

  1. Even if I changed the gpio port, the noise was the same.
  2. A problem occurs when LTDC or FMC initialization code is entered.

It seems that the data transfer from the touch screen is affecting the exti.

Is there anything else we can do to test the cause?

S.Ma
Principal

what is missing is a schmiddt trigger. if you can change the hw, you could use spi clk as your input and mosi as master output wih 0x5555 dma looped, or use input as timer clock from ETR and use filtering before generating a compare toggle output. otherwise, when exti isr triggers, disable itself and arm a timer compare to create a time exclude interrupt zone. when the compare fires, rearm exti... and disable timer's. this is the beginning of a interrupt ticked state machine.,

ssooki
Associate III

found the cause. There is no problem except the red color of the touch LCD RGB data.....

It is strange that data is periodically transferred to gpio...

The current situation is as follows.

  • exti1 interrupt : SMPS signal is being input, Trigger on every falling edge(16ms), and Toggle GPIO whenever triggered.
  • Red data is affecting the trigger.

​If anyone has similar symptoms, please advise...