Reply by Bertrik Sikken November 7, 20062006-11-07
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ds19968902 wrote:
> Hi, Im using the lpcusb stack on a 2148, and i get the code to compile
> under crossstudio and when i have it running windows will ask me for
> the driver and and that goes well. And all the characters do get
> echoed buy the vertual serial on the mcu across the usb. But what I am
> having trouble with is, im trying to get the printf working and scanf.
> I don't see how the characters are being echoed, the only thing i see
> in the main while loop is the usbhwisr but i never see where a putchar
> or get char is taking place. Any suggestions would be greatly
> appreciated, thanks!

I'm working on adding the FIFO as described in my other e-mail.
So far it seems to work under windows, but characters are lost when
used with linux. Linux sends larger packets than windows does, so
the FIFO gets full and characters are dropped.

Kind regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUMguETD6mlrWxPURAoWWAJ9MbBthw7WLPcSkQ1cL7X1askwMEwCfd2fC
gD4G5aCDSDiMcJwOfwsAP6E=bZVH
-----END PGP SIGNATURE-----

An Engineer's Guide to the LPC2100 Series

Reply by Bertrik Sikken November 3, 20062006-11-03
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

ds19968902 wrote:
> Hi, Im using the lpcusb stack on a 2148, and i get the code to compile
> under crossstudio and when i have it running windows will ask me for
> the driver and and that goes well. And all the characters do get
> echoed buy the vertual serial on the mcu across the usb. But what I am
> having trouble with is, im trying to get the printf working and scanf.
> I don't see how the characters are being echoed, the only thing i see
> in the main while loop is the usbhwisr but i never see where a putchar
> or get char is taking place. Any suggestions would be greatly
> appreciated, thanks!

The characters are being echoed in function BulkOut.
This function is a callback from the USB interrupt routine that is
invoked whenever data from the host arrives. In this simple example
the LPC dumps the data on the console and echoes all data back to
the PC by means of the USBHwEPWrite call.

The demo is really simple and not a full implementation of a UART
from the device point of view. It probably needs something like
FIFO's on the input and output side such that the main context
and interrupt context don't interfere with each other.

Regards,
Bertrik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFSztkETD6mlrWxPURAsTvAJ4/MuIyU9P94CdpIQExdVO9GEGJHQCggcL5
XFi+8EE+e9b9XEt/XXluBeY=sO2H
-----END PGP SIGNATURE-----
Reply by ds19968902 November 1, 20062006-11-01
Hi, Im using the lpcusb stack on a 2148, and i get the code to compile
under crossstudio and when i have it running windows will ask me for
the driver and and that goes well. And all the characters do get
echoed buy the vertual serial on the mcu across the usb. But what I am
having trouble with is, im trying to get the printf working and scanf.
I don't see how the characters are being echoed, the only thing i see
in the main while loop is the usbhwisr but i never see where a putchar
or get char is taking place. Any suggestions would be greatly
appreciated, thanks!

eric