Reading GPIO stops program execution?

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by fpg on Mon Mar 07 11:56:02 MST 2011
First of all I'm sorry if the solution to my problem is already mentioned somewhere, but I have no idea where to search for it...

I use LPCXpresso LPC1769 with the Embedded Artists LPCXPresso Baseboard. There is a project handed with the baseboard called disp7seg-rotary. It runs perfectly.

But when I try to use the functions of the rotary encoder, program execution stops after a few times of executing rotary_read function. By placing a breakpoint I found the very line, where it stops working:

uint8_t state = ROTARY_READ_STATE();

On the right there is a macro, it's just reading in the values of GPIO Port 0:
#define ROTARY_READ_STATE() ((GPIO_ReadValue(0) >> 24) & 0x03)

If this is coming next and I try to step over, debugging icons become inactive except stop and pause. If I just let it run, it reads the values for a while after that it simply stops running.

Anyone got any idea, what am I missing... ? :eek: :confused: