EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2368: problem with USB pins as GPIO pins

Started by laumasrd April 6, 2007
Hello everybody,

I'm trying to use D+ (P0.29)and D- (P0.30) USB pins as general purpose
input/output pins in a LPC2368. The data-sheet (Rev.01 - 31 October
2006) says at page 12 that the pads provide digital I/O and USB
function in accordance to USB specification. The pins work normally as
digital inputs but they don't seem to work as outputs: they seem to be
in a high-impedance state (it is the same if they are set as high or
low). Did anybody encounter the same problem? Do I have to put some
external pull-up or pull-down?
Thank you very much in advance for your help!

Davide

An Engineer's Guide to the LPC2100 Series

--- In l..., "laumasrd" wrote:
>
> Hello everybody,
>
> I'm trying to use D+ (P0.29)and D- (P0.30) USB pins as general purpose
> input/output pins in a LPC2368. The data-sheet (Rev.01 - 31 October
> 2006) says at page 12 that the pads provide digital I/O and USB
> function in accordance to USB specification. The pins work normally as
> digital inputs but they don't seem to work as outputs: they seem to be
> in a high-impedance state (it is the same if they are set as high or
> low). Did anybody encounter the same problem? Do I have to put some
> external pull-up or pull-down?
> Thank you very much in advance for your help!
>
> Davide
>

Hi Davide, It's Alberto writing.
Last week I have expreienced exactly the same problem you wrote in
your post...
I've tried to use P0.30 both as mandatary GPIO and fast GPIO, but I
can't use P0.30 as output pin.
It seems to be set as High Impedance.
This problem is only with this PIN, because other PINs of PORT0 works
if set as outputs...

I think it's a setting problem... but where?

Someone could help us?

Thank you in advance,

Alberto
Hi There,

You may need to do something else to get the pins to operate correctly
as GPIO, or you may not be able to get them to operate as GPIO.

The user manual states on page 114, under the Pin mode select register 1:

Remark: Pins P0.27 and P0.28 are dedicated I2C open drain pins without
pull-up/down.
Pins P0.29, P0.30, P0.31 are USB specific pins without configurable
pull-up or pull-down resistors.

So the pins are different to other pins. Because of this remark, I
didn't use those pins in my design.

Best Regards,

Brian Sidebotham.
abracadalba wrote:
> --- In l..., "laumasrd" wrote:
>> Hello everybody,
>>
>> I'm trying to use D+ (P0.29)and D- (P0.30) USB pins as general purpose
>> input/output pins in a LPC2368. The data-sheet (Rev.01 - 31 October
>> 2006) says at page 12 that the pads provide digital I/O and USB
>> function in accordance to USB specification. The pins work normally as
>> digital inputs but they don't seem to work as outputs: they seem to be
>> in a high-impedance state (it is the same if they are set as high or
>> low). Did anybody encounter the same problem? Do I have to put some
>> external pull-up or pull-down?
>> Thank you very much in advance for your help!
>>
>> Davide
>> Hi Davide, It's Alberto writing.
> Last week I have expreienced exactly the same problem you wrote in
> your post...
> I've tried to use P0.30 both as mandatary GPIO and fast GPIO, but I
> can't use P0.30 as output pin.
> It seems to be set as High Impedance.
> This problem is only with this PIN, because other PINs of PORT0 works
> if set as outputs...
>
> I think it's a setting problem... but where?
>
> Someone could help us?
>
> Thank you in advance,
>
> Alberto
Also Furthur to my experience this pins can be used with external pull
up but only either both as input or both as output .
Regards

Suvidh
--- In l..., Brian Sidebotham wrote:
>
> Hi There,
>
> You may need to do something else to get the pins to operate correctly
> as GPIO, or you may not be able to get them to operate as GPIO.
>
> The user manual states on page 114, under the Pin mode select
register 1:
>
> Remark: Pins P0.27 and P0.28 are dedicated I2C open drain pins without
> pull-up/down.
> Pins P0.29, P0.30, P0.31 are USB specific pins without configurable
> pull-up or pull-down resistors.
>
> So the pins are different to other pins. Because of this remark, I
> didn't use those pins in my design.
>
> Best Regards,
>
> Brian Sidebotham.
> abracadalba wrote:
> > --- In l..., "laumasrd" wrote:
> >> Hello everybody,
> >>
> >> I'm trying to use D+ (P0.29)and D- (P0.30) USB pins as general
purpose
> >> input/output pins in a LPC2368. The data-sheet (Rev.01 - 31 October
> >> 2006) says at page 12 that the pads provide digital I/O and USB
> >> function in accordance to USB specification. The pins work
normally as
> >> digital inputs but they don't seem to work as outputs: they seem
to be
> >> in a high-impedance state (it is the same if they are set as high or
> >> low). Did anybody encounter the same problem? Do I have to put some
> >> external pull-up or pull-down?
> >> Thank you very much in advance for your help!
> >>
> >> Davide
> >>
> >
> > Hi Davide, It's Alberto writing.
> > Last week I have expreienced exactly the same problem you wrote in
> > your post...
> > I've tried to use P0.30 both as mandatary GPIO and fast GPIO, but I
> > can't use P0.30 as output pin.
> > It seems to be set as High Impedance.
> > This problem is only with this PIN, because other PINs of PORT0 works
> > if set as outputs...
> >
> > I think it's a setting problem... but where?
> >
> > Someone could help us?
> >
> > Thank you in advance,
> >
> > Alberto
> >
>
Hi,
and thank you everybody for your answers.

I've read the user manual @ page 114, where it tells P0.30 hasn't the
possibility of set internal pull-up or pull-down... but they doesn't
write we can't use that pin as GPIO!!!
I think that if we can't use P0.30 as GPIO (and, for my purposes, as
output), the relative PINSEL selection (00) should be not possible,
but the user manual provide this selection...
Thank you again,
Alberto
--- In l..., "suvidhk" wrote:
>
> Also Furthur to my experience this pins can be used with external pull
> up but only either both as input or both as output .
> Regards
>
> Suvidh
>

Thank you very much Suvidth!!!
In my design P0.29 was an input, and P0.30 an output, both GPIO...
and P0.30 didn't work as output...
Now I've set P0.29 as output and P0.30 works correctly as output...

thank you again!!!

The 2024 Embedded Online Conference