Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: LPC2148 USB

2006-02-23 by pitstock_kiwi

Hi Varuzhan

I had the same problem where the USB would not re connect. Heres what 
I did. It is a hack but works until I have time to work it out 
properly or someone publishes the correct method.

I have set my MCB2140 as self powered for debugging ease. 

in USBCFG.h I changed some zeros ot ones like this

#define USB_POWER_EVENT     1//0
#define USB_RESET_EVENT     1
#define USB_SUSPEND_EVENT   1//0
#define USB_RESUME_EVENT    1//0
#define USB_WAKEUP_EVENT    1//0

in USBUSER.C I did this

#if USB_RESUME_EVENT
void USB_Resume_Event (void) {
  // TODO: hacky fix so reconnect works. Find out right way later
  // this fix makes self powerd devices work on reconnect
  USB_Reset();	// USB hardware reset
  USB_Init();                               /* USB Initialization */
  USB_Connect(TRUE);                        /* USB Connect */
}
#endif


Cheers
Kiwi Keith

--- In lpc2000@yahoogroups.com, "varuzhandanielyan" <dan@...> wrote:
>
> Nothing helps.
> 
> I am going step-by-step using ULINK and watching the P0.31
> state by scope.
> If I configure P0.31 as output, I can easily set it to 0 or
> 1, but when I configure it for CONNECT inside the USB_Init() :
> PINSEL1 |=  0x80004000;
> and try to set the SoftConnect_N active, P0.31 remains in
> high (inactive) state.
> I tried both calling the USB_Connect(TRUE) and immediate
> by commands
> CMD_CODE = 0x00FE0500;
> CMD_CODE = 0x00010100;
> placing them in different places, particularly after
> USB_Reset() as recommended - no effect.
> 
> Please, help me, what is wrong?
> 
> Great thanks in advance,
> Varuzhan
> 
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.