2009-04-02 10:07 PM
Interrupt on a falling edge.
2011-05-17 04:07 AM
Hi siddj;
I don't see any issue in your code. I'm wondering if you have already configured the Alternate function APB clock? However, are you sure that the EXTI input does not remain flaoting either there is no connection between your CPLD and STM32 or your CPLD output is a push-pull type (I think that is not the case)? PS: if your CPLD pull B8 high in the begennig (idle state) , you have to configure the EXTI to be triggered on the falling edge. B.R. M3allem2011-05-17 04:07 AM
Thanks for getting back to me on this. This is exactly what seems to be going wrong. When I try the code, without having the MCO clock output on pin A8, the interrupt worked just fine. I tried it on my board and and I just simulated an external interrupt by pulling the pin low. When I set and enable the MCO clock on pin A8 thats when the interrupt pending bit is also set and hence it keeps on going to the EXTI_9_5 IRQ. When I try to clear it, it sets again, repeatedly that it never gets out of the loop.
Is this only because I setting the EXTI to line 8? And both my clock on A8 and interrupt pin on B8 fall on the same line? I have asked ST about this problem, don't know when or if they would get back to me on that. I was wondering if I could accomplish the same task by using a PWM in input mode. The only problem is that I am not really measuring frequency but I do want a counter to start when the pin goes low and then in the IRQ i pull the pin high again and then when it goes low again, the counter would stop. Since it is not a simple frequency or pulse detection process I am not sure if this would work. If you have any tips I would greatly appreciate it.2011-05-17 04:07 AM
PROBLEM SOLVED!
Failed to set the AFIO clock! 1 week on this.....................ouchh!2011-05-17 04:07 AM
Ah!! I've already adviced you to check this!!! :)...
B.R. M3allem