Chris Lincoln

Need help with GPIO on EPORT of M52233DEMO board

Discussion created by Chris Lincoln on Oct 24, 2007
Latest reply on Oct 26, 2007 by Chris Lincoln
I am a CF nube--I appreciate your patience. On this demo board, I am trying to poll the SW1 and SW2 switches. When pressed, the switches short IRQ7 and IRQ1 respectively to GND. When not pressed, IRQ7 and IRQ1 are pulled up to 3.3V via a 10K resistor. I have confirmed that the circuit is working up to the CF.
 
It is my understanding that these signals are configured as digital input at reset and I can simply read either MCF_GPIO_PORTNQ or MCF_GPIO_SETNQ and mask the appropriate bit in my polling routine to check whether a switch is pressed. Unfortunately, all bits in these registers are '1' regardless of the state of the switch. I have tried to explicitly configure the PAR and DDR registers as well, with no change in result.  I've also tried to work the with EPORT registers, with no luck either. It is not crystal clear to me how the EPORT and NQ registers map from reading the datasheet.
 
Can anyone shed some light on this? I am going to dive into figuring out how to write an ISR in the mean time. This board is on loan from a sales rep, so there is a possibility that the device cells have been dinged by a previous program.
 
Thank you,
Chris

Outcomes