Yahoo Groups archive

Lpc2000

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

Thread

LPC214x: USB hangs after some hours

LPC214x: USB hangs after some hours

2006-01-13 by gcopoix

Hi LPC group,

I have an unnice problem regarding the LPC 214x USB communication:

I've built a project based on the Keil MassStorage example.
The only difference: I changed the descriptor to a non-class device, 
setup 7in/7out pipes (I only use 2 BULK_IN and 1 BULK_OUT, needed 
this amount of declared pipes for descriptor compatibility reasons).
I've also added 1 timer interrupt, and 2 UART interrupts.

1 BULK_IN and 1 BULK_OUT are used as command bulk pipes which are 
used handshaked (means every command written is answered).

In application level (non-interrupt driven, called by main loop) I 
check if I received some data e.g. over UART. The UART is buffered by 
a ringbuffer (ISR -> ringbuffer) and the application sends the 
received data from ringbuffer->USB (calling USB_WriteEP()).

Now the problem: This works OK for several hours, but then mostly in 
WrCmd() after writing CMD_CODE the while-loop waiting for CCEMTY_INT 
doesn't leave, resulting in a hanging USB communication.

I've seen a hanging situation also in the USB ISR after setting 
EP_INT_CLR and waiting for CDFULL_INT.

I tried to disable the USB interrupt while calling USB_WriteEP() - 
same result (may be a bit better, but can't say exactly).
I also tried to send only within an USB interrupt (SOF irq), same 
result too.

So my questions:
- Does anybody else have this problem ?
- What can be the reason for a non-accepted CMD_CODE or a
  non-accepted write to EP_INT_CLR ?
- What to I need to take care of before calling USB_WriteEP() ?
- Is it forbidden to send by application level ?
- Is there a patch for the Keil USB stack ?
- Is there some errata about this ?
- What can I do to prevent this or what to resolve this situation ?

Thank you for your help

Gregor

Re: [lpc2000] LPC214x: USB hangs after some hours

2006-01-13 by Karsten Weiss

Hello Gregor,
this sounds familiar to me. First of all, you should check, if the 
problem is on the host or on the client side. I haven't worked with the 
LPC USB, yet, but with other USB to serial converters (namely CP2102 
from SiLabs and FT232 from FTDI), always with the same result. In my 
case, it seems to be a problem with the OS (Win2K and WinXP), but I 
haven't found any solution up to now. I have the theory, that the USB 
framework driver of the OS is disabling the device due to communication 
errors (the reason for them might be EMV problems). It depends on the 
implementation on the host side USB driver of your device, if it handles 
this correctly. I was able to reduce this disabling by filtering the USB 
data lines of my device properly (putting two small caps of 47p between 
D+ and GND resp. D- and GND directly at the USB connector on my board).

Karsten

gcopoix schrieb:
Show quoted textHide quoted text
>Hi LPC group,
>
>I have an unnice problem regarding the LPC 214x USB communication:
>
>I've built a project based on the Keil MassStorage example.
>The only difference: I changed the descriptor to a non-class device, 
>setup 7in/7out pipes (I only use 2 BULK_IN and 1 BULK_OUT, needed 
>this amount of declared pipes for descriptor compatibility reasons).
>I've also added 1 timer interrupt, and 2 UART interrupts.
>
>1 BULK_IN and 1 BULK_OUT are used as command bulk pipes which are 
>used handshaked (means every command written is answered).
>
>In application level (non-interrupt driven, called by main loop) I 
>check if I received some data e.g. over UART. The UART is buffered by 
>a ringbuffer (ISR -> ringbuffer) and the application sends the 
>received data from ringbuffer->USB (calling USB_WriteEP()).
>
>Now the problem: This works OK for several hours, but then mostly in 
>WrCmd() after writing CMD_CODE the while-loop waiting for CCEMTY_INT 
>doesn't leave, resulting in a hanging USB communication.
>
>I've seen a hanging situation also in the USB ISR after setting 
>EP_INT_CLR and waiting for CDFULL_INT.
>
>I tried to disable the USB interrupt while calling USB_WriteEP() - 
>same result (may be a bit better, but can't say exactly).
>I also tried to send only within an USB interrupt (SOF irq), same 
>result too.
>
>So my questions:
>- Does anybody else have this problem ?
>- What can be the reason for a non-accepted CMD_CODE or a
>  non-accepted write to EP_INT_CLR ?
>- What to I need to take care of before calling USB_WriteEP() ?
>- Is it forbidden to send by application level ?
>- Is there a patch for the Keil USB stack ?
>- Is there some errata about this ?
>- What can I do to prevent this or what to resolve this situation ?
>
>Thank you for your help
>
>Gregor
>
>
>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>

Re: [lpc2000] LPC214x: USB hangs after some hours

2006-01-13 by Micron Engineering

Karsten Weiss ha scritto:

>Hello Gregor,
>this sounds familiar to me. First of all, you should check, if the 
>problem is on the host or on the client side. I haven't worked with the 
>LPC USB, yet, but with other USB to serial converters (namely CP2102 
>from SiLabs and FT232 from FTDI), always with the same result. In my 
>case, it seems to be a problem with the OS (Win2K and WinXP), but I 
>haven't found any solution up to now. I have the theory, that the USB 
>framework driver of the OS is disabling the device due to communication 
>errors (the reason for them might be EMV problems). It depends on the 
>implementation on the host side USB driver of your device, if it handles 
>this correctly. I was able to reduce this disabling by filtering the USB 
>data lines of my device properly (putting two small caps of 47p between 
>D+ and GND resp. D- and GND directly at the USB connector on my board).
>
>Karsten
>
>gcopoix schrieb:
>  
>
A good idea when dealing with communications is to deal with 
disconnection/reconnection problem. This seems to be a very old lesson 
implemented also in tcp
that has a FSM to manage all communications phases.
Massimo Manca, Micron Engineering

>  
>
>>Hi LPC group,
>>
>>I have an unnice problem regarding the LPC 214x USB communication:
>>
>>I've built a project based on the Keil MassStorage example.
>>The only difference: I changed the descriptor to a non-class device, 
>>setup 7in/7out pipes (I only use 2 BULK_IN and 1 BULK_OUT, needed 
>>this amount of declared pipes for descriptor compatibility reasons).
>>I've also added 1 timer interrupt, and 2 UART interrupts.
>>
>>1 BULK_IN and 1 BULK_OUT are used as command bulk pipes which are 
>>used handshaked (means every command written is answered).
>>
>>In application level (non-interrupt driven, called by main loop) I 
>>check if I received some data e.g. over UART. The UART is buffered by 
>>a ringbuffer (ISR -> ringbuffer) and the application sends the 
>>received data from ringbuffer->USB (calling USB_WriteEP()).
>>
>>Now the problem: This works OK for several hours, but then mostly in 
>>WrCmd() after writing CMD_CODE the while-loop waiting for CCEMTY_INT 
>>doesn't leave, resulting in a hanging USB communication.
>>
>>I've seen a hanging situation also in the USB ISR after setting 
>>EP_INT_CLR and waiting for CDFULL_INT.
>>
>>I tried to disable the USB interrupt while calling USB_WriteEP() - 
>>same result (may be a bit better, but can't say exactly).
>>I also tried to send only within an USB interrupt (SOF irq), same 
>>result too.
>>
>>So my questions:
>>- Does anybody else have this problem ?
>>- What can be the reason for a non-accepted CMD_CODE or a
>> non-accepted write to EP_INT_CLR ?
>>- What to I need to take care of before calling USB_WriteEP() ?
>>- Is it forbidden to send by application level ?
>>- Is there a patch for the Keil USB stack ?
>>- Is there some errata about this ?
>>- What can I do to prevent this or what to resolve this situation ?
>>
>>Thank you for your help
>>
>>Gregor
>>
>>
>>
>>
>>
>>
>>
>>Yahoo! Groups Links
>>
>>
>>
>>
>>
>>
>>
>>
>> 
>>
>>    
>>
>
>
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>


  ----------

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.16/225 - Release Date: 09/01/2006


[Non-text portions of this message have been removed]

LPC214x USBMEM stressed hangs after some seconds (USB hangs after some hours)

2006-01-16 by gcopoix

Update to "LPC214x: USB hangs after some hours":

I went back to the original KEIL USBMEM example 
(http://www.keil.com/download/files/lpc2148_usbmem.zip) and stressed 
it with some simple stream-io code to exclude my driver/application 
(not very nice, but does the job, call this code with the USBMEM 
device letter as parameter):

int main(int argc, char* argv[])
{
  int           iResult = 0;
  char          cFile[] = "C:\\Testfile.txt";
  unsigned char data[1024];

  if (1 == argc)
  {
    char dev;

    printf("Device-Letter: ");
    scanf("%c", &dev);

    // patch device letter
    cFile[0] = dev;
  }
  else if (2 == argc)
  {
    // patch device letter
    cFile[0] = argv[1][0];
  }
  else
  {
    printf("USAGE: TestUSBMasStorage [C|D|E|...]\n");
    iResult = 1;
  }

  if (0 == iResult)
  {
    FILE* f;
    int i;

    // fill buffer
    for (i = 0 ; i < sizeof(data) ; i++)
    data[i] = (unsigned char)(i & 0xFF);

    for (i = 0 ; 0 == iResult ; i++)
    {
      printf("%d\r", i);

      if (NULL != (f = fopen(cFile, "wb")))
      {
        fwrite(data, sizeof(data), 1, f);
        fflush(f);
        fclose(f);

        _flushall();

        // read/compare data
        if (NULL != (f = fopen(cFile, "rb")))
        {
          unsigned char cmp[sizeof(data)];

          if (1 != fread(cmp, sizeof(cmp), 1, f))
            iResult = 2;
          else if (0 != memcmp(data, cmp, sizeof(data)))
          {
            iResult = 6;
          }
          fclose(f);
          _flushall();
        }
        else
          iResult = 4;
      }
      else
        iResult = 3;
    }
  }

  if (0 == iResult)
    printf("\nSuccess!");
  else
    printf("\nError: %d\n", iResult);

  return iResult;
}


With this stress the USBMEM device will hang within seconds.
The error looks the same I have in my own firmware, I reported the 
problem (http://groups.yahoo.com/group/lpc2000/message/12316).

Has anybody solved this problem ?

Gregor

RE: [lpc2000] LPC214x USBMEM stressed hangs after some seconds (USB hangs after some hours)

2006-01-17 by Joel Winarske

> I went back to the original KEIL USBMEM example
> (http://www.keil.com/download/files/lpc2148_usbmem.zip) and stressed
> it with some simple stream-io code to exclude my driver/application
> (not very nice, but does the job, call this code with the USBMEM
> device letter as parameter):

I just ran your test code on IAR LPC2148 KickStart board, against the IAR
USB MassStorage example code.  No problem.  The refresh time of the SD card
contents is good too.

I'll let RAM disk run a while.  So far it's past 20k and counting.

The Keil examples need work.


Joel

RE: [lpc2000] LPC214x USBMEM stressed hangs after some seconds (USB hangs after some hours)

2006-01-17 by Joel Winarske

> > I went back to the original KEIL USBMEM example
> > (http://www.keil.com/download/files/lpc2148_usbmem.zip) and stressed
> > it with some simple stream-io code to exclude my driver/application
> > (not very nice, but does the job, call this code with the USBMEM
> > device letter as parameter):
> 
> I just ran your test code on IAR LPC2148 KickStart board, against the IAR
> USB MassStorage example code.  No problem.  The refresh time of the SD
> card
> contents is good too.
> 
> I'll let RAM disk run a while.  So far it's past 20k and counting.

It's up to 131k and still counting, even when pasting the Keil c51v801.exe
eval software to the SD card...  All 26Meg of it.

You might want to take a look at the IAR code.


Joel

Re: LPC214x USBMEM stressed hangs after some seconds (USB hangs after some hours

2006-01-17 by Dave McDonald

--- In lpc2000@yahoogroups.com, "Joel Winarske" <joelw@i...> wrote:
>
> > > I went back to the original KEIL USBMEM example
> > > (http://www.keil.com/download/files/lpc2148_usbmem.zip) and stressed
> > > it with some simple stream-io code to exclude my driver/application
> > > (not very nice, but does the job, call this code with the USBMEM
> > > device letter as parameter):
> > 
> > I just ran your test code on IAR LPC2148 KickStart board, against
the IAR
> > USB MassStorage example code.  No problem.  The refresh time of the SD
> > card
> > contents is good too.
> > 
> > I'll let RAM disk run a while.  So far it's past 20k and counting.
> 
> It's up to 131k and still counting, even when pasting the Keil
c51v801.exe
> eval software to the SD card...  All 26Meg of it.
> 
> You might want to take a look at the IAR code.

I just downloaded the IAR KickStart software for LPC2148 (but not the
entire KickStart package) but the only USB samples I saw there were
for the mouse function. Is there somewhere else I need to look for the
MassStorage example? 

Dave
Show quoted textHide quoted text
> 
> 
> Joel
>

Re: [lpc2000] Re: LPC214x USBMEM stressed hangs after some seconds (USB hangs after some hours

2006-01-17 by Joel Winarske

Hi Dave,

I just downloaded the IAR KickStart software for LPC2148 (but not the
> entire KickStart package) but the only USB samples I saw there were
> for the mouse function. Is there somewhere else I need to look for the
> MassStorage example?


Then it must not be included in the current KickStart version.  It's in the
current maintenance release for licensees.

You might want to contact your local IAR office to ask about it..


Joel


[Non-text portions of this message have been removed]

Re: LPC214x: USB hangs after some hours

2006-01-31 by philips_apps

Lately, I have been scratching my head to get the LPC2148 USB 
device pass the USBCV test downloaded from "http://www.usb.org".

Using latest Keil's USB MSC sample, v1.04, the enumeration test 
will fail from time to time, and program would spin in the 
WrCmd() or WrCmdDat() routine forever.

While I was looking into the WrCmd(), WrCmdDat() and RdCmdDat()
routine and ISR carefully, Keil just found one problem that could
screw up the USB protocol engine.

In the USB device block, the registers are located in the VPB
clock domain, which requires minimum 18Mhz PCLK. in the original 
MSC example, PCLK uses the default value 1/4 of CCLK = 15Mhz in
the startup.s. That has probably caused most of the intermitten 
problems in these Wr/RdCmdDat() modules. The PCLK should be set
to >= 18Mhz.

I think that Keil will release a new version of these
example based on the fixes soon. I am just glad that I am 
finally able to use the latest fixes to pass all the compliance
test. So, I pass around to those who had problems with the
LPC2148 USB driver:

   Do the following steps:
   (1) in startup.s, set: 
    VPBDIV_SETUP    EQU     1
    VPBDIV_Val      EQU     0x00000001 ; PCLK is set to CCLK 60Mhz

   (2) In usbhw.c, modify these modules, WrCmd(), WrCmdDat(), 
and RdCmdDat() as below:

/*
 *  Write Command
 *    Parameters:      cmd:   Command
 *    Return Value:    None
 */

void WrCmd (DWORD cmd) {

  DEV_INT_CLR = CCEMTY_INT;
  CMD_CODE = cmd;
  while ((DEV_INT_STAT & CCEMTY_INT) == 0);
}

/*
 *  Write Command Data
 *    Parameters:      cmd:   Command
 *                     val:   Data
 *    Return Value:    None
 */

void WrCmdDat (DWORD cmd, DWORD val) {

  DEV_INT_CLR = CCEMTY_INT;
  CMD_CODE = cmd;
  while ((DEV_INT_STAT & CCEMTY_INT) == 0);
  DEV_INT_CLR = CCEMTY_INT;
  CMD_CODE = val;
  while ((DEV_INT_STAT & CCEMTY_INT) == 0);
}

/*
 *  Read Command Data
 *    Parameters:      cmd:   Command
 *    Return Value:    Data Value
 */

DWORD RdCmdDat (DWORD cmd) {

  DEV_INT_CLR = CCEMTY_INT | CDFULL_INT;
  CMD_CODE = cmd;
  while ((DEV_INT_STAT & CDFULL_INT) == 0);
  return (CMD_DATA);
}

    (3) in usbhw.c, in the interrupt handler, USB_ISR(), 
comment out "DEV_INT_CLR = CDFULL_INT;" as seen below:
          ...
          EP_INT_CLR = 1 << n;
          while ((DEV_INT_STAT & CDFULL_INT) == 0);
          val = CMD_DATA;
//          DEV_INT_CLR = CDFULL_INT;

          if ((n & 1) == 0) {              /* OUT Endpoint */
            if (n == 0) {                  /* Control OUT Endpoint */
              if (val & EP_SEL_STP) {      /* Setup Packet */
                if (USB_P_EP[0]) {
                  USB_P_EP[0](USB_EVT_SETUP);
                  continue;
                }
              }
            }

That will probably address many intermitten problems seen in the
past. Meanwhile, we are working hard to improve our documentation
in the USB chapter.

Regards,

Tom

 

--- In lpc2000@yahoogroups.com, "gcopoix" <GCopoix@g...> wrote:
>
> Hi LPC group,
> 
> I have an unnice problem regarding the LPC 214x USB communication:
> 
> I've built a project based on the Keil MassStorage example.
> The only difference: I changed the descriptor to a non-class 
device, 
> setup 7in/7out pipes (I only use 2 BULK_IN and 1 BULK_OUT, needed 
> this amount of declared pipes for descriptor compatibility 
reasons).
> I've also added 1 timer interrupt, and 2 UART interrupts.
> 
> 1 BULK_IN and 1 BULK_OUT are used as command bulk pipes which are 
> used handshaked (means every command written is answered).
> 
> In application level (non-interrupt driven, called by main loop) I 
> check if I received some data e.g. over UART. The UART is buffered 
by 
> a ringbuffer (ISR -> ringbuffer) and the application sends the 
> received data from ringbuffer->USB (calling USB_WriteEP()).
> 
> Now the problem: This works OK for several hours, but then mostly 
in 
> WrCmd() after writing CMD_CODE the while-loop waiting for 
CCEMTY_INT 
Show quoted textHide quoted text
> doesn't leave, resulting in a hanging USB communication.
> 
> I've seen a hanging situation also in the USB ISR after setting 
> EP_INT_CLR and waiting for CDFULL_INT.
> 
> I tried to disable the USB interrupt while calling USB_WriteEP() - 
> same result (may be a bit better, but can't say exactly).
> I also tried to send only within an USB interrupt (SOF irq), same 
> result too.
> 
> So my questions:
> - Does anybody else have this problem ?
> - What can be the reason for a non-accepted CMD_CODE or a
>   non-accepted write to EP_INT_CLR ?
> - What to I need to take care of before calling USB_WriteEP() ?
> - Is it forbidden to send by application level ?
> - Is there a patch for the Keil USB stack ?
> - Is there some errata about this ?
> - What can I do to prevent this or what to resolve this situation ?
> 
> Thank you for your help
> 
> Gregor
>

[lpc2000] CVS

2006-01-31 by Marko Pavlin (home)

Hello!

How many of you are using CVS ?  I just installed server on freeBSD and 
it works fine. Now I don't know which client is perfect for "win machine"?

M.

RE: [lpc2000] CVS

2006-01-31 by Joel Winarske

> How many of you are using CVS ?  I just installed server on freeBSD and
> it works fine. Now I don't know which client is perfect for "win machine"?

You might want to look at http://www.wincvs.org/


Joel

Re: [lpc2000] CVS

2006-01-31 by Clyde Stubbs

On Tue, Jan 31, 2006 at 11:10:25PM +0100, Marko Pavlin (home) wrote:
> How many of you are using CVS ?  I just installed server on freeBSD and 

CVS, while quite useful, is also quite dated. You would be better off
starting with Subversion, which is a much more modern version control
system, still freeware.

http://subversion.tigris.org/


-- 
Clyde Stubbs                     |            HI-TECH Software
Email: clyde@...          |          Phone            Fax
WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
PGP:   finger clyde@...   | AUS: +61 7 3722 7777 +61 7 3722 7778
---------------------------------------------------------------------------
HI-TECH C: compiling the real world.

Re: CVS

2006-02-01 by ntfreak2000

I would second that - cvs is getting rather dated now.
You can use TortoiseSVN on your windose box

http://tortoisesvn.tigris.org/

Regards
Spen

--- In lpc2000@yahoogroups.com, Clyde Stubbs <clyde@h...> wrote:
>
> On Tue, Jan 31, 2006 at 11:10:25PM +0100, Marko Pavlin (home) wrote:
> > How many of you are using CVS ?  I just installed server on
freeBSD and 
> 
> CVS, while quite useful, is also quite dated. You would be better off
> starting with Subversion, which is a much more modern version control
> system, still freeware.
> 
> http://subversion.tigris.org/
> 
> 
> -- 
> Clyde Stubbs                     |            HI-TECH Software
> Email: clyde@h...          |          Phone            Fax
> WWW:   http://www.htsoft.com/    | USA: (408) 490 2885  (408) 490 2885
> PGP:   finger clyde@h...   | AUS: +61 7 3722 7777 +61 7 3722 7778
>
---------------------------------------------------------------------------
> HI-TECH C: compiling the real world.
>

Re: [lpc2000] Re: CVS

2006-02-01 by 42Bastian Schick

ntfreak2000 <ntfreak2@...> schrieb am Wed, 01 Feb 2006 00:18:20 
-0000:

> I would second that - cvs is getting rather dated now.
> You can use TortoiseSVN on your windose box

I am using CVS (cvsnt on Windows) for quiete a while and have to say,
that the SVN version-number style is rather *hmm* strange.

But you are right, esp. many OpenSource projects switch to SVN.

One major advantage of SVN is, that you can diff off-line as it pulls
the whole database on your local disc.

One major disadvantage is, that it is not as easy to setup a server.

-- 
42Bastian Schick

Re: [lpc2000] CVS

2006-02-01 by 42Bastian Schick

Marko Pavlin (home) <mp@...> schrieb am Tue, 31 Jan 2006 23:10:25 +0100:

> Hello!
>
> How many of you are using CVS ?  I just installed server on freeBSD and
> it works fine. Now I don't know which client is perfect for "win 
> machine"?

winCVS - gui
cvsnt - command line

-- 
42Bastian Schick

RE: [lpc2000] OT:CVS

2006-02-01 by Michael Rubitschka

Hi Joel

We are using Win CVS V1.2 . Later Versions have a problem with
Summertime when your offices are in Europe and America.
Not a mayor problem though.

Also we are uzsin Jaldini Igloo to integrate CVS to Visual Studio.

Today for a starter I think subversion is a better choice instead of cvs.

Cheers
Michael OE1MIS
Show quoted textHide quoted text
>From: "Joel Winarske" <joelw@...>
>Reply-To: lpc2000@yahoogroups.com
>To: <lpc2000@yahoogroups.com>
>Subject: RE: [lpc2000] CVS
>Date: Tue, 31 Jan 2006 14:15:20 -0800
>
> > How many of you are using CVS ?  I just installed server on freeBSD and
> > it works fine. Now I don't know which client is perfect for "win 
>machine"?
>
>You might want to look at http://www.wincvs.org/
>
>
>Joel
>
>

RE: [lpc2000] OT:CVS

2006-02-01 by Joel Winarske

Hi Michael,

> Hi Joel
> 
> We are using Win CVS V1.2 . Later Versions have a problem with
> Summertime when your offices are in Europe and America.
> Not a mayor problem though.
> 
> Also we are uzsin Jaldini Igloo to integrate CVS to Visual Studio.
> 
> Today for a starter I think subversion is a better choice instead of cvs.


I always try to give a direct answer to a pointed question.  I am aware of
SVN, have it installed, and use it.  If advice is what the original poster
wanted, he may have asked direct questions.  Providing a direct answer I
feel, maintains respect for the poster.  I like the idea that the cup is
half full.


Cheers,
Joel

RE: [lpc2000] OT:CVS

2006-02-01 by Michael Rubitschka

Hi Joel

Wasnt this part of the answer "direct" enough ?

> > We are using Win CVS V1.2 . Later Versions have a problem with
> > Summertime when your offices are in Europe and America.
> > Not a mayor problem though.
> >
> > Also we are uzsin Jaldini Igloo to integrate CVS to Visual Studio.
> >

I dont understand whats your problem, but maybeeit is better this way.
I truly apologize if my answer didn't meet your expectations.

Cheers
Michael
Show quoted textHide quoted text
>From: "Joel Winarske" <joelw@...>
>Reply-To: lpc2000@yahoogroups.com
>To: <lpc2000@yahoogroups.com>
>Subject: RE: [lpc2000]  OT:CVS
>Date: Wed, 1 Feb 2006 00:58:59 -0800
>
>Hi Michael,
>
> > Hi Joel
> >
> > We are using Win CVS V1.2 . Later Versions have a problem with
> > Summertime when your offices are in Europe and America.
> > Not a mayor problem though.
> >
> > Also we are uzsin Jaldini Igloo to integrate CVS to Visual Studio.
> >
> > Today for a starter I think subversion is a better choice instead of 
>cvs.
>
>
>I always try to give a direct answer to a pointed question.  I am aware of
>SVN, have it installed, and use it.  If advice is what the original poster
>wanted, he may have asked direct questions.  Providing a direct answer I
>feel, maintains respect for the poster.  I like the idea that the cup is
>half full.
>
>
>Cheers,
>Joel
>
>

RE: [lpc2000] OT:CVS

2006-02-01 by Joel Winarske

> I dont understand whats your problem, but maybeeit is better this way.
> I truly apologize if my answer didn't meet your expectations.

No worries.  BTW I didn't post the original question.

Joel

Re: [lpc2000] OT:CVS

2006-02-01 by Marko Pavlin

Thanks for the tips. Tortoise and WIN32 port of the CVS is all I needed.

Marko

Joel Winarske wrote:
Show quoted textHide quoted text
>  > I dont understand whats your problem, but maybeeit is better this way.
>  > I truly apologize if my answer didn't meet your expectations.
> 
> No worries.  BTW I didn't post the original question.
> 
> Joel
> 
>

Re: [lpc2000] Re: CVS

2006-02-01 by Craig Schlenter

On 01 Feb 2006, at 7:34 AM, 42Bastian Schick wrote:
> One major advantage of SVN is, that you can diff off-line as it pulls
> the whole database on your local disc.

Incorrect.

The most recent version you updated to is stored locally inside .svn
but not everything else so diffing against other revisions requires a
trip to the server.

--Craig

Re: [lpc2000] Re: CVS

2006-02-01 by 42Bastian Schick

Craig

> On 01 Feb 2006, at 7:34 AM, 42Bastian Schick wrote:
>> One major advantage of SVN is, that you can diff off-line as it pulls
>> the whole database on your local disc.
>
> Incorrect.
>
> The most recent version you updated to is stored locally inside .svn
> but not everything else so diffing against other revisions requires a
> trip to the server.

Thanks for correcting. That's what I meant. I check out, change, forgot
what I changed and can easily diff.

Albeit you can do this with cvs as well, only not automated:
check out, copy tree, change, use normal diff not cvs diff

:-)

-- 
42Bastian Schick

Re: [lpc2000] Re: CVS

2006-02-01 by Anton Erasmus

On 1 Feb 2006 at 6:34, 42Bastian Schick wrote:

> ntfreak2000 <ntfreak2@...> schrieb am Wed, 01 Feb 2006 00:18:20 
> -0000:
> 
> > I would second that - cvs is getting rather dated now.
> > You can use TortoiseSVN on your windose box
> 
> I am using CVS (cvsnt on Windows) for quiete a while and have to say,
> that the SVN version-number style is rather *hmm* strange.
> 
> But you are right, esp. many OpenSource projects switch to SVN.
> 
> One major advantage of SVN is, that you can diff off-line as it pulls
> the whole database on your local disc.
> 
> One major disadvantage is, that it is not as easy to setup a server.
>
It is just as easy to setup a SVN server if one do not require the use of
the http and/or https protocols. If one are using either the svn:// or file:///
access methods, then setting up a SVN server is about equivalent to
setting up a CVS server. Unfortunately the documentation uses the
http:// protocol almost exclusively in it's examples. Using tortoiseSVN
under windows works very well and is very easy to use.

Regards
  Anton Erasmus
-- 
A J Erasmus

Re: [lpc2000] Re: CVS

2006-02-01 by FreeRTOS Info

> It is just as easy to setup a SVN server if one do not require the use of
> the http and/or https protocols. If one are using either the svn:// or
file:///
> access methods, then setting up a SVN server is about equivalent to
> setting up a CVS server.

I don't think you actually need to setup an SVN server at all if you use the
file:/// protocol.  I just have a repository(s) on a file server that people
connect to directly.  Works really well.  Just means you cannot use a
browser interface, but why would I want to anyway?

I do actually have an SVN server installed on one machine simple because the
server installation package includes the hot copy utility used for backing
up the repositories, whereas the tortoise client installation package
doesn't.

Regards,
Richard.

http://www.FreeRTOS.org

Re: CVS

2006-02-01 by kevinblackmore_nz

--- In lpc2000@yahoogroups.com, "FreeRTOS Info" <nospam@...> wrote:
>
> > It is just as easy to setup a SVN server if one do not require 
the use of
> > the http and/or https protocols. If one are using either the 
svn:// or
> file:///
> > access methods, then setting up a SVN server is about equivalent 
to
> > setting up a CVS server.

I recently setup SVN using the apache HTTP server and found it very 
easy.
Took all of about 1-2 hours and I have no experience with version 
control and/or http servers.

I used the XAMPP package to install apache which made installing a 
breeze but beware that XAMPP leaves the server unsecured (not a 
problem in our installation). 
(http://www.apachefriends.org/en/xampp.html)

XAMPP takes care of all the HTTPS setup and includes some other web 
services (PHP, MySQL etc) which are quite useful (I'm starting to 
learn how to use these tools now).

I found the tortoise documentation excellent (easier to read than 
the SVN
docs) for setting up the server and users.

If you do decide to use XAMPP you will need to use Version 1.50 as 
SVN doesn't currently work with Apache2.2.0.

Good luck implementing you version control system, whatever you 
decide to use.
I'll never go back to working without one now.

Regards
Kevin

Strange problem with PLL

2006-02-01 by Xtian Xultz

Hello!

I am working in a LPC2106, using a 10MHz crystal. I configure PLL to work at 
50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any difference 
between the circuit when it locks and when it does not locks.

Somebody had problems with PLL? Or maybe I have a malfunctioning chip?

Re: Strange problem with PLL

2006-02-01 by arm7dude

--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> Hello!
> 
> I am working in a LPC2106, using a 10MHz crystal. I configure PLL to
work at 
> 50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any
difference 
> between the circuit when it locks and when it does not locks.
> 
> Somebody had problems with PLL? Or maybe I have a malfunctioning chip?
>

I've seen occasional pll won't lock. I'm using a 2148 @12 mhz and pll
set to 48 mhz.

Ed

Re: [lpc2000] Re: Strange problem with PLL

2006-02-01 by Xtian Xultz

Em Qua 01 Fev 2006 20:53, arm7dude escreveu:
> --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
> > Hello!
> >
> > I am working in a LPC2106, using a 10MHz crystal. I configure PLL to
>
> work at
>
> > 50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any
>
> difference
>
> > between the circuit when it locks and when it does not locks.
> >
> > Somebody had problems with PLL? Or maybe I have a malfunctioning chip?
>
> I've seen occasional pll won't lock. I'm using a 2148 @12 mhz and pll
> set to 48 mhz.
>
> Ed

Did you find any work around? My hardware will be powered up not by a user but 
bya system, and my somplete system will have 16 LPCs so I cant power and 
unpower many times until I can have a PLL working. 
Maybe a timeout and soft restart can give a result?
Any suggestions?

Re: [lpc2000] Re: CVS

2006-02-02 by Scott Newell

At 10:32 AM 2/1/2006, 42Bastian Schick wrote:

>Thanks for correcting. That's what I meant. I check out, change, forgot
>what I changed and can easily diff.
>
>Albeit you can do this with cvs as well, only not automated:
>check out, copy tree, change, use normal diff not cvs diff

Really?  I do it all the time: check out a file, make a mod, and "cvs diff" 
will show the changes between the repository and the modified local file.

-- 
newell

Re: [lpc2000] Strange problem with PLL

2006-02-02 by Jaromir Subcik

According to User Manual, you use lowest possible crystal, but it may works. Do you set CCO within recommended range 156 to 320MHz? For desired frequency 50MHz you must output divider adjust to 4 to keep this CCO range.

Jarda
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: Xtian Xultz 
  To: lpc2000@yahoogroups.com 
  Sent: Wednesday, February 01, 2006 11:27 PM
  Subject: [lpc2000] Strange problem with PLL


  Hello!

  I am working in a LPC2106, using a 10MHz crystal. I configure PLL to work at 
  50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any difference 
  between the circuit when it locks and when it does not locks.

  Somebody had problems with PLL? Or maybe I have a malfunctioning chip?

[Non-text portions of this message have been removed]

Re: [lpc2000] Re: CVS

2006-02-02 by 42Bastian Schick

Scott Newell <digital.pickle@...> schrieb am Wed, 01 Feb 2006 18:32:

>> Albeit you can do this with cvs as well, only not automated:
>> check out, copy tree, change, use normal diff not cvs diff
>
> Really?  I do it all the time: check out a file, make a mod, and "cvs 
> diff"
> will show the changes between the repository and the modified local file.
>

If you have a connection to the repository. I often work off-line, so
here I cannot use cvs (or is there a trick ?).

-- 
42Bastian Schick

Re: [lpc2000] Strange problem with PLL

2006-02-02 by Xtian Xultz

Em Qui 02 Fev 2006 06:05, Jaromir Subcik escreveu:
> According to User Manual, you use lowest possible crystal, but it may
> works. Do you set CCO within recommended range 156 to 320MHz? For desired
> frequency 50MHz you must output divider adjust to 4 to keep this CCO range.

Yes, I am (I think I am).
My PLL routine is like that:

	SCB_PLLCFG = 0x24;
        SCB_PLLCON = 0x01; 
        SCB_PLLFEED = 0xAA; 
        SCB_PLLFEED = 0x55;

	while(!(SCB_PLLSTAT & 0x00000400))

        SCB_PLLCON = 0x03;

        SCB_PLLFEED = 0xAA;
        SCB_PLLFEED = 0x55;
Show quoted textHide quoted text
>
> Jarda
>   ----- Original Message -----
>   From: Xtian Xultz
>   To: lpc2000@yahoogroups.com
>   Sent: Wednesday, February 01, 2006 11:27 PM
>   Subject: [lpc2000] Strange problem with PLL
>
>
>   Hello!
>
>   I am working in a LPC2106, using a 10MHz crystal. I configure PLL to work
> at 50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any
> difference between the circuit when it locks and when it does not locks.
>
>   Somebody had problems with PLL? Or maybe I have a malfunctioning chip?
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>

Re: Strange problem with PLL

2006-02-02 by Karl Olsen

--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> Em Qui 02 Fev 2006 06:05, Jaromir Subcik escreveu:
>> According to User Manual, you use lowest possible crystal, but it 
>> may works. Do you set CCO within recommended range 156 to 320MHz? 
>> For desired frequency 50MHz you must output divider adjust to 4 to 
>> keep this CCO range.
> 
> Yes, I am (I think I am).
> My PLL routine is like that:
> 
> SCB_PLLCFG = 0x24;
> SCB_PLLCON = 0x01; 
> SCB_PLLFEED = 0xAA; 
> SCB_PLLFEED = 0x55;
> 
> while(!(SCB_PLLSTAT & 0x00000400))
> 
> SCB_PLLCON = 0x03;
> 
> SCB_PLLFEED = 0xAA;
> SCB_PLLFEED = 0x55;

Ahem, you are repeatedly enabling and connecting the PLL while you 
wait for it to lock.  Try a ; or {} after the while().

Karl Olsen

Re: [lpc2000] Re: Strange problem with PLL

2006-02-02 by Xtian Xultz

Em Qui 02 Fev 2006 08:47, Karl Olsen escreveu:
> --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
> > Em Qui 02 Fev 2006 06:05, Jaromir Subcik escreveu:
> >> According to User Manual, you use lowest possible crystal, but it
> >> may works. Do you set CCO within recommended range 156 to 320MHz?
> >> For desired frequency 50MHz you must output divider adjust to 4 to
> >> keep this CCO range.
> >
> > Yes, I am (I think I am).
> > My PLL routine is like that:
> >
> > SCB_PLLCFG = 0x24;
> > SCB_PLLCON = 0x01;
> > SCB_PLLFEED = 0xAA;
> > SCB_PLLFEED = 0x55;
> >
> > while(!(SCB_PLLSTAT & 0x00000400))
> >
> > SCB_PLLCON = 0x03;
> >
> > SCB_PLLFEED = 0xAA;
> > SCB_PLLFEED = 0x55;
>
> Ahem, you are repeatedly enabling and connecting the PLL while you
> wait for it to lock.  Try a ; or {} after the while().
>
> Karl Olsen

Damn! Why didnt I see that obvious problem???? 
Thank you so much, Karl!!!!!

Re: Strange problem with PLL

2006-02-02 by brendanmurphy37

Just a suggestion, but I learned long ago it's a good idea to get 
into the habit of doing this like:

while (wait_volatile_flag_object)
{
    ;
}

This makes it really obvious what's going on.

It's an extension of another habit of always using braces, even when 
they're not required, as in:

while (s != end)
{
    sum += *s++;
}

This makes it a lot easier to add/delete lines of code without having 
unintended consequences.

By the way, this is obviously off-topic: I don't intend to start a 
thread on coding style/standards.....

Brendan


--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> Em Qui 02 Fev 2006 08:47, Karl Olsen escreveu:
> > --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@> wrote:
> > > Em Qui 02 Fev 2006 06:05, Jaromir Subcik escreveu:
> > >> According to User Manual, you use lowest possible crystal, but 
it
> > >> may works. Do you set CCO within recommended range 156 to 
320MHz?
> > >> For desired frequency 50MHz you must output divider adjust to 
4 to
Show quoted textHide quoted text
> > >> keep this CCO range.
> > >
> > > Yes, I am (I think I am).
> > > My PLL routine is like that:
> > >
> > > SCB_PLLCFG = 0x24;
> > > SCB_PLLCON = 0x01;
> > > SCB_PLLFEED = 0xAA;
> > > SCB_PLLFEED = 0x55;
> > >
> > > while(!(SCB_PLLSTAT & 0x00000400))
> > >
> > > SCB_PLLCON = 0x03;
> > >
> > > SCB_PLLFEED = 0xAA;
> > > SCB_PLLFEED = 0x55;
> >
> > Ahem, you are repeatedly enabling and connecting the PLL while you
> > wait for it to lock.  Try a ; or {} after the while().
> >
> > Karl Olsen
> 
> Damn! Why didnt I see that obvious problem???? 
> Thank you so much, Karl!!!!!
>

Re: LPC214x: USB hangs after some hours

2006-02-02 by Carsten Grøn

Hello philipsapps (Tom),

I have had some (a LOT) of stability issues with the Keil examples, 
and I was about to incorporate the changes you outlined below. The 
WRCmd, WrCmdDat and rdCmdDat are easy enough to change in the Keil 
samples, however the USB_INT is not like the "original code" you 
show below. The versions on keil.com is 1.00 and you mention v 
1.04 ?? Any idea as to what must be changed in USB_ISR in the 
current 1.00 (which is the only one available from keil at the 
moment)

Regards,
Carsten

--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> 
wrote:
>
> Lately, I have been scratching my head to get the LPC2148 USB 
> device pass the USBCV test downloaded from "http://www.usb.org".
> 
> Using latest Keil's USB MSC sample, v1.04, the enumeration test 
> will fail from time to time, and program would spin in the 
> WrCmd() or WrCmdDat() routine forever.
> 
> While I was looking into the WrCmd(), WrCmdDat() and RdCmdDat()
> routine and ISR carefully, Keil just found one problem that could
> screw up the USB protocol engine.
> 
> In the USB device block, the registers are located in the VPB
> clock domain, which requires minimum 18Mhz PCLK. in the original 
> MSC example, PCLK uses the default value 1/4 of CCLK = 15Mhz in
> the startup.s. That has probably caused most of the intermitten 
> problems in these Wr/RdCmdDat() modules. The PCLK should be set
> to >= 18Mhz.
> 
> I think that Keil will release a new version of these
> example based on the fixes soon. I am just glad that I am 
> finally able to use the latest fixes to pass all the compliance
> test. So, I pass around to those who had problems with the
> LPC2148 USB driver:
> 
>    Do the following steps:
>    (1) in startup.s, set: 
>     VPBDIV_SETUP    EQU     1
>     VPBDIV_Val      EQU     0x00000001 ; PCLK is set to CCLK 60Mhz
> 
>    (2) In usbhw.c, modify these modules, WrCmd(), WrCmdDat(), 
> and RdCmdDat() as below:
> 
> /*
>  *  Write Command
>  *    Parameters:      cmd:   Command
>  *    Return Value:    None
>  */
> 
> void WrCmd (DWORD cmd) {
> 
>   DEV_INT_CLR = CCEMTY_INT;
>   CMD_CODE = cmd;
>   while ((DEV_INT_STAT & CCEMTY_INT) == 0);
> }
> 
> /*
>  *  Write Command Data
>  *    Parameters:      cmd:   Command
>  *                     val:   Data
>  *    Return Value:    None
>  */
> 
> void WrCmdDat (DWORD cmd, DWORD val) {
> 
>   DEV_INT_CLR = CCEMTY_INT;
>   CMD_CODE = cmd;
>   while ((DEV_INT_STAT & CCEMTY_INT) == 0);
>   DEV_INT_CLR = CCEMTY_INT;
>   CMD_CODE = val;
>   while ((DEV_INT_STAT & CCEMTY_INT) == 0);
> }
> 
> /*
>  *  Read Command Data
>  *    Parameters:      cmd:   Command
>  *    Return Value:    Data Value
>  */
> 
> DWORD RdCmdDat (DWORD cmd) {
> 
>   DEV_INT_CLR = CCEMTY_INT | CDFULL_INT;
>   CMD_CODE = cmd;
>   while ((DEV_INT_STAT & CDFULL_INT) == 0);
>   return (CMD_DATA);
> }
> 
>     (3) in usbhw.c, in the interrupt handler, USB_ISR(), 
> comment out "DEV_INT_CLR = CDFULL_INT;" as seen below:
>           ...
>           EP_INT_CLR = 1 << n;
>           while ((DEV_INT_STAT & CDFULL_INT) == 0);
>           val = CMD_DATA;
> //          DEV_INT_CLR = CDFULL_INT;
> 
>           if ((n & 1) == 0) {              /* OUT Endpoint */
>             if (n == 0) {                  /* Control OUT Endpoint 
*/
Show quoted textHide quoted text
>               if (val & EP_SEL_STP) {      /* Setup Packet */
>                 if (USB_P_EP[0]) {
>                   USB_P_EP[0](USB_EVT_SETUP);
>                   continue;
>                 }
>               }
>             }
> 
> That will probably address many intermitten problems seen in the
> past. Meanwhile, we are working hard to improve our documentation
> in the USB chapter.
> 
> Regards,
> 
> Tom
> 
>

Re: LPC214x: USB hangs after some hours

2006-02-02 by philips_apps

Carsten,

    I went to Keil's website a few days ago. In Keil's
weblink, "http://www.keil.com/download/docs/307.asp?bhcp=1" 
named "LPC2148 USB Mass Storage Device Example" is probably 
the earliest version of USB examples which has NOT been
updated.
    The newer version should be in the eval. version of 
Keil's uVision3 IDE, under "\Keil\ARM\Boards\Keil\MCB2140\".
You can download it from their website too. The latest should 
be v1.04.

Hopefully, it helps!

Tom
 
 

--- In lpc2000@yahoogroups.com, Carsten Grøn <cgroen@...> wrote:
>
> Hello philipsapps (Tom),
> 
> I have had some (a LOT) of stability issues with the Keil 
examples, 
Show quoted textHide quoted text
> and I was about to incorporate the changes you outlined below. The 
> WRCmd, WrCmdDat and rdCmdDat are easy enough to change in the Keil 
> samples, however the USB_INT is not like the "original code" you 
> show below. The versions on keil.com is 1.00 and you mention v 
> 1.04 ?? Any idea as to what must be changed in USB_ISR in the 
> current 1.00 (which is the only one available from keil at the 
> moment)
> 
> Regards,
> Carsten
>

Re: Strange problem with PLL

2006-02-02 by arm7dude

--- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@...> wrote:
>
> Em Qua 01 Fev 2006 20:53, arm7dude escreveu:
> > --- In lpc2000@yahoogroups.com, Xtian Xultz <xultz@> wrote:
> > > Hello!
> > >
> > > I am working in a LPC2106, using a 10MHz crystal. I configure PLL to
> >
> > work at
> >
> > > 50MHz. Sometimes the PLL locks, but sometimes dont. I cant see any
> >
> > difference
> >
> > > between the circuit when it locks and when it does not locks.
> > >
> > > Somebody had problems with PLL? Or maybe I have a malfunctioning
chip?
> >
> > I've seen occasional pll won't lock. I'm using a 2148 @12 mhz and pll
> > set to 48 mhz.
> >
> > Ed
> 
> Did you find any work around? My hardware will be powered up not by
a user but 
> bya system, and my somplete system will have 16 LPCs so I cant power
and 
> unpower many times until I can have a PLL working. 
> Maybe a timeout and soft restart can give a result?
> Any suggestions?
>

What values of MSEL and PSEL did you use. I found the examples a
little confusing. I'm guessing you're using MSEL=4 for 5x and PSEL can
be 2 for 4x. 10 mhz * 5 * 4= 200 mhz which is between 156-320 Mhz.

I've been using the 2148 with 12 mhz clock and 48 mhz CCL using
prebuilt applications without and problems.

Ed

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.