Yahoo Groups archive

Lpc2000

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

Message

Re: LPC2146 Keil Mass Storage Example

2005-12-01 by mark_dell555

Thanks for the help, just figured it out.  You need to use
CMD_SET_MODE, to tell it to generate interrupts on Bulk In NAK.  Check
out pg224, of the LPC214x User Manual.  I changed my USB_Configure()
procedure to the following:

void USB_Configure (BOOL cfg) {

  WrCmdDat(CMD_CFG_DEV, DAT_WR_BYTE(cfg ? CONF_DVICE : 0));
  WrCmdDat(CMD_SET_MODE, DAT_WR_BYTE(INAK_BI));

  REALIZE_EP = 0x00000003;
  while ((DEV_INT_STAT & EP_RLZED_INT) == 0);
  DEV_INT_CLR = EP_RLZED_INT;
}

Basically just adding the 2nd line, and that did it.  Now I can go to
sleep  :)

Cheers,
Mark

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.