- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please help!!
I've read this thread: http://www.cypress.com/forum/psoc-4-ble/two-interrupts-ez-ble-psoc-cyble-014008-00-pins-p01-and-p04?...
Unfortunately, I cannot use that solution because my interrupt must be triggered by both rising and falling edges. Anyway, I manage to use two adjacent pins but Creator doesn't take my pin assignment. According to PSoC Creator User Guide, Page 234: P#[#:#] – Specifies a range of locations where the first # is the port number, the second number is the offset within the port where the MSB of the signal should be placed, and the last # is the offset within the port where the LSB of the signal should be placed.
Therefore, to assign P2.4 and P2.5, I entered P2[5:4] in the Port column of Pin Editor and, the Editor modifies P2[5:4] to P2[4:5] and automatically fills in 30,31 (which are correct pin #'s) in the Pin column. It then pops up an error: Invalid pin assignment. See the attachment 1.png.
Question: what is the correct value to enter in the Port and Pin columns for P2.4 and P2.5?
Note: My version is
PSoC Creator 4.0 Update 1 (4.0.0.432)
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR Version: 4.0.30319.1
Solved! Go to Solution.
- Labels:
-
BLE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post your code so we can check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.