Using on board switch on Xpresso V2 board for LPC11U37H

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using on board switch on Xpresso V2 board for LPC11U37H

1,417 Views
ojaskulkarni
Contributor I

Hello,

 

I am using NXP Xpresso V2 board for LPC11U37H. I am trying to blink on board LED's by reading SW1 and SW2. To sense SW1 and SW2, I am using  API library functions, Board_Buttons_Init(), ButtonsGetStatus().

With this I am able to sense SW2 properly but SW1 is always pressed detected. My question is, because SW1 is connected to WAKEUP pin and supplying external voltage, do I need to initialize this GPIO in different manner as of GPIO of SW2 ? Is this triggering SW1 to detect always pressed?

166786_166786.pngpastedImage_1.png

Original Attachment has been moved to: board.c.zip

Labels (1)
Tags (2)
0 Kudos
Reply
6 Replies

1,139 Views
pavelhudecek
Contributor III

Hi,

enable internal pull-up for this pin or connect it via resistor 1-100 kOhm to 3.3 V.

0 Kudos
Reply

1,139 Views
ojaskulkarni
Contributor I

Hi Pavel,

I tried by activating internal pull up for that pin but still detecting as switch is pressed.

Regards,

Ojas

0 Kudos
Reply

1,139 Views
pavelhudecek
Contributor III

I'm sorry, I mistook SW1 with SW2. SW1 have pull-up R73 and not need internal.
:-)

0 Kudos
Reply

1,139 Views
DavidS
NXP Employee
NXP Employee

Hi Ojas,

Check your RV2 setting.  If it is shorting to ground your signal will not ever be high (deasserted).

If it is set so PIO0_16-ADC_5-WAKEUP is high, I think it should work (I don’t have a board but looked at schematic).

 pastedImage_1.png

Regards,

David

0 Kudos
Reply

1,139 Views
ojaskulkarni
Contributor I

Hi David,

Good observation, I checked for RV2 but it is not shorted to ground. Looks like have some other issue.

Regards,

Ojas

0 Kudos
Reply

1,139 Views
pavelhudecek
Contributor III

This is probably the right direction. You must set the trimmer to majority from the 3.3 V.
Attention: At 100%, or very close to 100% SW1 cannot able to decrease voltage bellow threshold, because R66 prevents it.

(I do not know if I wrote it correctly in English)

0 Kudos
Reply