EmbeddedRelated.com
Forums

LPC2368 PORT2 problems

Started by drproton2003 February 7, 2007
Hello everyone,

I am experiencing a problem with port 2 on the LPC2368. Basically my
application toggles P2.0 and P2.1 when certain events occur. P2.0
simply flashes an LED at a constant rate. When the code first starts
they work fine. However after the program has been paused and resumed
by the JTAG they stop working, I think they get set back to inputs. I
have confirmed that the FIOSET and FIOCLR fucntions still get called
after the break. Why would pausing the program have this effect? The
first thing my code does on startup is disable the ETM (PINSEL10=0),
is it possible that the ETM is turning back on somehow? I see no
change in PINSEL10 after a break.

After a break the FIO2DIR registers are all set to 0, if everytime
before the LED toggles I set FIO2DIR it works. This workaround is
reasonable, but I would still like to understand the root problem.

I use rowley crossworks with a crossconnect for development.

An Engineer's Guide to the LPC2100 Series

Well I haven't been able to solve this problem. I figured it would be
better to add the calls to set FIO2DIR and keep some fist-sized holes
out of the drywall. In another test I set P2.0 to P2.5 to PWM mode.
In PWM mode they are not disturbed by any debugging activity. Any
reason why GPIO would be affected, but not PWM?

--- In l..., "drproton2003" wrote:
>
> Hello everyone,
>
> I am experiencing a problem with port 2 on the LPC2368. Basically my
> application toggles P2.0 and P2.1 when certain events occur. P2.0
> simply flashes an LED at a constant rate. When the code first starts
> they work fine. However after the program has been paused and resumed
> by the JTAG they stop working, I think they get set back to inputs. I
> have confirmed that the FIOSET and FIOCLR fucntions still get called
> after the break. Why would pausing the program have this effect? The
> first thing my code does on startup is disable the ETM (PINSEL10=0),
> is it possible that the ETM is turning back on somehow? I see no
> change in PINSEL10 after a break.
>
> After a break the FIO2DIR registers are all set to 0, if everytime
> before the LED toggles I set FIO2DIR it works. This workaround is
> reasonable, but I would still like to understand the root problem.
>
> I use rowley crossworks with a crossconnect for development.
>
--- In l..., "drproton2003" wrote:
>
> Well I haven't been able to solve this problem. I figured it would be
> better to add the calls to set FIO2DIR and keep some fist-sized holes
> out of the drywall. In another test I set P2.0 to P2.5 to PWM mode.
> In PWM mode they are not disturbed by any debugging activity. Any
> reason why GPIO would be affected, but not PWM?
>
> --- In l..., "drproton2003" wrote:
> >
> > Hello everyone,
> >
> > I am experiencing a problem with port 2 on the LPC2368. Basically my
> > application toggles P2.0 and P2.1 when certain events occur. P2.0
> > simply flashes an LED at a constant rate. When the code first starts
> > they work fine. However after the program has been paused and
resumed
> > by the JTAG they stop working, I think they get set back to
inputs. I
> > have confirmed that the FIOSET and FIOCLR fucntions still get called
> > after the break. Why would pausing the program have this effect?
The
> > first thing my code does on startup is disable the ETM (PINSEL10=0),
> > is it possible that the ETM is turning back on somehow? I see no
> > change in PINSEL10 after a break.
> >
> > After a break the FIO2DIR registers are all set to 0, if everytime
> > before the LED toggles I set FIO2DIR it works. This workaround is
> > reasonable, but I would still like to understand the root problem.
> >
> > I use rowley crossworks with a crossconnect for development.
> Hello,

I am experiencing a similar problem with a LPC2366 and IAR JTAG link.
Any information about JTAG en Fast GPIO interferences ?

Thanks