DEEP SLEEP WAKEUP FROM MULTI KEY INPUT?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

CY8C4248LQI-BL483, How can I use P2 [4 ~ 7] as KEY INPUT and DEEP SLEEP WAKEUP?

0 Likes
1 Solution
Anonymous
Not applicable

Close. You want the 4 pins on the same component however, like this:

PINS_COMPONENT.PNG

(Obviously, the left-hand side is merely how you plan to wire it external for documentation/remembering)

(And the isr_1 on the right-hand side is actually connected to the irq terminal output at the bottom of the pins component)

The following images are pictures of how I configured the pins for my use, but you may be able to change the polarity and edge interrups to suit your own needs I think:

Main_Pins_Page.PNG

Interrupt_Pins_Page.PNG

Pins_Mapping_Page.PNG

View solution in original post

5 Replies
Anonymous
Not applicable

Setup a pins component containing all of the buttons you want to use, set them to active-low, and then wire up a ISR component to the output interrupt of the pins component.

Under the pins component, Input tab, you can configure the device to trigger an interrupt on either or both edges, as well as a dedicated interrupt using the check-box.

0 Likes
Anonymous
Not applicable

I set up 4 PINs as Digital input and HW connection, and then I connected to ISR.

"Generate Application" causes an error.

I'd appreciate it if you could tell me how to set it up.

Thank you.

pastedImage_0.png

pastedImage_1.png

pastedImage_3.png

pastedImage_5.png

0 Likes
Anonymous
Not applicable

Close. You want the 4 pins on the same component however, like this:

PINS_COMPONENT.PNG

(Obviously, the left-hand side is merely how you plan to wire it external for documentation/remembering)

(And the isr_1 on the right-hand side is actually connected to the irq terminal output at the bottom of the pins component)

The following images are pictures of how I configured the pins for my use, but you may be able to change the polarity and edge interrups to suit your own needs I think:

Main_Pins_Page.PNG

Interrupt_Pins_Page.PNG

Pins_Mapping_Page.PNG

Anonymous
Not applicable

I solved it thanks to you.

Thank you for your help.

There is one question.

Do you have to use a continuous port when using 4 ports?

For example, should not P0 [0 ~ 3] be used as P0 [0], P0 [2], P0 [3], P0 [7]?

0 Likes
Anonymous
Not applicable

For getting all of the interrupts on the same ISR routine, you will need to use contiguous ports. You most likely can split them up to have each pin be handled by a separate isr, but for my application I didn't need that functionality. The continuity is only necessary for having all four pins generate the same interrupt iirc.

epratt

0 Likes