This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
The user guide for FR2433 says that input interrupt can happen only on positive or negative edge,
0b = PxIFG flag is set with a low-to-high transition
1b = PxIFG flag is set with a high-to-low transition
is there a way to trigger interrupt on both positive and negative edges?
thanks vadim
As Cash Hao says, there's no setting that provides this function.
Two alternative methods: (1) reverse the IES on each interrupt (2) adopt a timer capture pin and use CM=3.
Hi Bruce,
Thank you verymuch for your help! I was able to utilize your suggestion with this line
reverse = reverse^(0x1);
GPIO_selectInterruptEdge(
GPIO_PORT_P2,
GPIO_PIN4,
reverse
);
I tried to do the same by writing only to
P2IES = reverse;
but nothing happened
thanks vadim
>reverse = reverse^(0x1);
Try:
> reverse = reverse ^ GPIO_PIN4;
Also be sure "reverse" is initialized appropriately.
[Edit: Wrong. See below.]
Sorry, I should have looked more closely at the library source code. Your original code should have worked, given an appropriate initial value for "reverse".
I personally would have used:
> P2IES ^= BIT4; // Reverse P2.4 interrupt sense
**Attention** This is a public forum