-
1. Re: Port/pin assignment for multi-pin interrupt
user_242978793 Jul 1, 2017 11:48 AM (in response to tonyofreno_1673171)Please post your code so we can check it.
-
2. Re: Port/pin assignment for multi-pin interrupt
tonyofreno_1673171 Jul 2, 2017 1:52 AM (in response to tonyofreno_1673171)While I prepare a sample code, I figured out what went wrong.
I get the error if I type in P2[5:4] manually. There is no error if I select P2[5:4] from the dropdown list. Lesson learned: use the dropdown for multi-pin interrupt!!
Thank you, bobgoar, for reading my question.
-
3. Re: Port/pin assignment for multi-pin interrupt
tonyofreno_1673171 Jul 2, 2017 8:39 PM (in response to tonyofreno_1673171)I am still stuck.
I can configure two contiguous pins by using the dropdown list. However, I actually need to configure 3 pins in my application: P2.2, P2.4, and P2.5, and all three pins must accept Rising and Falling Edge interrupts. The dropdown list does not give me that option, but offers P2[5:3]. I typed manually P2[5:4],P2[2] (as the user guide suggests) but Creator rejects that.
If I select <auto-assign during build> for the port, Creator generates the error
E2809: Unable to find a valid placement for pins .... (see error1.png)
My last attempt: uncheck Contiguous box in the Mapping tab of cy_pins configuration window, but Creator gives an error:
When interrupts are used, spanning is not allowed ... (see error2.png)
I am wondering if Creator has a limit that it doesn't support the assignment of P2.2, P2.4, and P2.5 when interrupt is required.
The sample code is attached. In this example, place-holding pins are added so only P2.2, P2.4, and P2.5 are available.
I appreciate any input that may help.
-
erro2.png 62.4 K
-
error1_0.png 42.8 K
-
4. Re: Port/pin assignment for multi-pin interrupt
e.pratt_1639216 Jul 3, 2017 8:06 AM (in response to tonyofreno_1673171)When the creator says "Contiguous", it means pins with consecutive numbering: Port2:3-5, Port2:4-6, Port2:5-7, etc.
Is there any way you can get the interrupt pin to be P2-3 instead of P2-2? Otherwise, I don't see a way to do three interrupts on the same port.
-
5. Re: Port/pin assignment for multi-pin interrupt
tonyofreno_1673171 Jul 3, 2017 9:03 PM (in response to tonyofreno_1673171)Thanks, e.pratt! I'll take your advice and move P2.2 to P2.3 with jumper wire on my prototype. I'll change the design in the next version.