--- In lpc2000@yahoogroups.com, "goudoevr" <goudoevr@x...> wrote:
>
> --- In lpc2000@yahoogroups.com, "mark_dell555" <mark_dell555@y...>
> wrote:
> >
> > Hi, I compiled the Keil Mass Storage example for the LPC2146 (just
> > changed the compiler settings to LPC2146), however when I try to run
> > it on my LPC2146 board, it sees the mass storage device fine, and
> can
> > read from it, however it cant write anything to it (XP stalls).
> >
> > Anyways I wasnt sure what the problem, and went on to putting
> togather
> > my own bulk transfer protocol, and now I'm having another problem
> > where BulkOut interrupt fires fine, but BulkIn interrupt doesnt fire
> > at all, and my device reads timeout (using libusb-win32).
> >
> > So I'm wondering if the two problems are related? Has anyone else
> had
> > similar problems with the keil usb stack? Any help is, as always,
> > greatly appriciated.
> >
> >
> > Cheers,
> > Mark
> >
>
> Hi mark
>
> I had the same problem with my own bulk-in transfer intially, but it
> was solved after I made sure there was always a filled Bulk-In
> endpoint. So you should fill the endpoint even before the host
> requests for data. You only get an interrupt to fill the bulk-in
> endpoint after a successful transaction.
>
> Jeroen
>
Hrmm according to the LPC214x User Manual, if the Bulk-In endpoint is
empty, it should send a NAK back to the host, and then generate the
Bulk-In interrupt. But I'll try doing what you suggest.
Thanks,
Mark
"For data transfer from an endpoint to the host, the host will send an
IN token to that endpoint. If the FIFO corresponding to the endpoint
is empty, the device will return a NAK and will raise an interrupt to
the system. On this interrupt the CPU fills a packet of data in the
endpoint FIFO.The next IN token that comes after filling this packet
will transfer this packet to the host." -- LPC214x User Manual