Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | The board resets?

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

The board resets? - empresst007 - Oct 1 21:39:54 2008

Hey All,

I've got a strange phenomenon happening on my Olimex LPC2138 devel
board. It's been about a month since I last touched my project and I
was getting back into the swing of things when I discovered that the
board seems to "shut off" the program. It doesn't turn off the board
because I see the power light on. But it behaves as if it resets the
program, but doesn't actually start the program over. The motors just
remain turning at their last PWM command and my test LEDs turn off
completely. There is no watchdog timer to reset in my code.

I went through the code to comment through and see what the problem
is. This problem only occurs when the PWM commands (PWMMR2 and PWMMR5)
are happening. Keep in mind everything was working last month and I
didn't change anything. Have anyone seen this before? I know this
question is a bit dubious but I have no other way to explain it.

Thanks!
Trish
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: The board resets? - "J.C. Wren" - Oct 1 21:52:22 2008

Motors are a terrible source of noise. Do you have an oscilloscope you can
use to look at any of the lines going back to the board? Check your power
supply, including the ground rails, for noise and ground bounce. Assuming
these are NOT brushless motors, you probably want an MOV right at the motor
terminals.
We've had this problem on a product. We use a small DC motor to drive a
locking mechanism. When the motor runs, particularly if there is a load on
the motor caused by someone blocking the door, the motor generates a lot of
noise. The H-bridge is controlled by an I2C expander, and the back EMF
actually causes the I2C expander to go stupid. Apparently the outputs get
switched to inputs, and high impedance state of the inputs is enough to turn
on the FETs driveing the H-bridge. When the program writes the data
register to turn off the motor, it doesn't do any good, since the pins we
expect to be outputs are not. This stupidity causes the motor to run
indefinitely. As a result, we have to let the motor run a fixed period of
time, then reprogram the I2C expander pins back to outputs before commanding
it to turn the motor off. Of course, this causes *other* glitches on some
of the other port expander pins we had to now work around in software.

The H-bridge is quite sturdy, and has a fair amount of filtering on it. In
spite of this, the spikes that get back are enough to confuse the I2C
expander. Placing an MOV on the motor terminals has completely eliminated
this problem.

--jc

On Wed, Oct 1, 2008 at 9:39 PM, empresst007 wrote:

> Hey All,
>
> I've got a strange phenomenon happening on my Olimex LPC2138 devel
> board. It's been about a month since I last touched my project and I
> was getting back into the swing of things when I discovered that the
> board seems to "shut off" the program. It doesn't turn off the board
> because I see the power light on. But it behaves as if it resets the
> program, but doesn't actually start the program over. The motors just
> remain turning at their last PWM command and my test LEDs turn off
> completely. There is no watchdog timer to reset in my code.
>
> I went through the code to comment through and see what the problem
> is. This problem only occurs when the PWM commands (PWMMR2 and PWMMR5)
> are happening. Keep in mind everything was working last month and I
> didn't change anything. Have anyone seen this before? I know this
> question is a bit dubious but I have no other way to explain it.
>
> Thanks!
> Trish
>
>
>
[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: The board resets? - Robert Adsett - Oct 1 22:26:35 2008

empresst007 wrote:
> Hey All,
>
> I've got a strange phenomenon happening on my Olimex LPC2138 devel
> board. It's been about a month since I last touched my project and I
> was getting back into the swing of things when I discovered that the
> board seems to "shut off" the program. It doesn't turn off the board
> because I see the power light on. But it behaves as if it resets the
> program, but doesn't actually start the program over. The motors just
> remain turning at their last PWM command and my test LEDs turn off
> completely. There is no watchdog timer to reset in my code.

Check you are not caught in an exception. It's common practice for
exception vectors to be programmed in an infinite loop so they lock
there for catching in a debugger.

That will leave open the question of why an exception occurs if it does.
As JC says motor driven PWM can be quite noisy. Your board must be
well decoupled. Also you must have adequate low ESR capacitance on the
motors DC bus. The motor and control board should not be directly on
the same DC bus, If they operate off of the same voltage consider using
a diode and a hold-up cap to isolate the control board from dips in the
main DC supply. You do have a voltage supervisor on the micro don't you?

Robert

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: The board resets? - Cool Dude - Oct 3 7:49:46 2008

hello Jc... I would like to know which i2c expander have you used. I've an I2C expander(pca9532,NXP) which i'm not able to work.

Raj

----- Original Message ----
From: J.C. Wren
To: l...@yahoogroups.com
Sent: Thursday, October 2, 2008 7:22:15 AM
Subject: Re: [lpc2000] The board resets?
Motors are a terrible source of noise. Do you have an oscilloscope you can
use to look at any of the lines going back to the board? Check your power
supply, including the ground rails, for noise and ground bounce. Assuming
these are NOT brushless motors, you probably want an MOV right at the motor
terminals.
We've had this problem on a product. We use a small DC motor to drive a
locking mechanism. When the motor runs, particularly if there is a load on
the motor caused by someone blocking the door, the motor generates a lot of
noise. The H-bridge is controlled by an I2C expander, and the back EMF
actually causes the I2C expander to go stupid. Apparently the outputs get
switched to inputs, and high impedance state of the inputs is enough to turn
on the FETs driveing the H-bridge. When the program writes the data
register to turn off the motor, it doesn't do any good, since the pins we
expect to be outputs are not. This stupidity causes the motor to run
indefinitely. As a result, we have to let the motor run a fixed period of
time, then reprogram the I2C expander pins back to outputs before commanding
it to turn the motor off. Of course, this causes *other* glitches on some
of the other port expander pins we had to now work around in software.

The H-bridge is quite sturdy, and has a fair amount of filtering on it. In
spite of this, the spikes that get back are enough to confuse the I2C
expander. Placing an MOV on the motor terminals has completely eliminated
this problem.

--jc

On Wed, Oct 1, 2008 at 9:39 PM, empresst007 wrote:

> Hey All,
>
> I've got a strange phenomenon happening on my Olimex LPC2138 devel
> board. It's been about a month since I last touched my project and I
> was getting back into the swing of things when I discovered that the
> board seems to "shut off" the program. It doesn't turn off the board
> because I see the power light on. But it behaves as if it resets the
> program, but doesn't actually start the program over. The motors just
> remain turning at their last PWM command and my test LEDs turn off
> completely. There is no watchdog timer to reset in my code.
>
> I went through the code to comment through and see what the problem
> is. This problem only occurs when the PWM commands (PWMMR2 and PWMMR5)
> are happening. Keep in mind everything was working last month and I
> didn't change anything. Have anyone seen this before? I know this
> question is a bit dubious but I have no other way to explain it.
>
> Thanks!
> Trish
>

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

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



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: The board resets? - "J.C. Wren" - Oct 3 10:18:31 2008

Micrel MIC74 is the port expander we've had trouble with.

--jc

On Fri, Oct 3, 2008 at 7:49 AM, Cool Dude wrote:

> hello Jc... I would like to know which i2c expander have you used. I've
> an I2C expander(pca9532,NXP) which i'm not able to work.
>
> Raj
[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )