Flash Magic Forum

Archive => Old Topics => Topic started by: Markus Buerstner on March 09, 2004, 06:21:12 AM

Title: LPC 932 Watchdog
Post by: Markus Buerstner on March 09, 2004, 06:21:12 AM
Hi!

I'm using Flashmagic V1.87 for programming the LPC932.
Programming works pretty fine until i set the 'enable watchdog' bit in the device configuration window.
I have problems entering bootstrap mode (reset pulses or break condition) after activating the watchdog.

Any ideas?

Thanx!
Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on March 09, 2004, 06:30:16 AM
LPC932 + watchdog enabled = no ISP. This is a known problem that Philips are aware of. Basically the bootloader does not feed the watchdog, so it times out. If you click on the search link at the top and enter "watchdog" you will find a lot of past postings on this subject.

Title: Re: LPC 932 Watchdog
Post by: Markus Buerstner on March 09, 2004, 06:56:18 AM
Oh, sorry, i found only postings about using the watchdog timer for serial communication. I missed the ISP stuff...

*sigh* This is getting nasty. Pretty difficult to debug my WD code. One try and the controller is gone for good :-(
And the PDS900 emulator doesnt support the watchdog at the moment.

A new bootloader with WD-support is the only work-around at the moment? Is there a download available?

Cheers!
Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on March 09, 2004, 07:06:45 AM
I'm not sure the status of new bootloaders - I believe the LPC935 does not have this problem. I don't know if Philips will provide a user-programmable replacement for the LPC932. You might want to check with them.

Title: Re: LPC 932 Watchdog
Post by: Markus Buerstner on March 09, 2004, 11:32:28 PM
Thanx!
Maybe there will be a new controller revision soon ;-)
I might be able to abandon the WD option for a while...

Bye!
Title: Re: LPC 932 Watchdog
Post by: Markus Buerstner on March 10, 2004, 12:57:20 AM
Hi!

It's me again ;-)
On the Philips website (selector table 2-clk-controllers) i saw a LPC932 with improved programmability. Unfortunatelly the device seems to be only available in a PLCC package.
Did i get this right?
Is it possible to use a LPC935 as a replacement? Does a 932 program run on a 935 without changes.

Markus
Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on March 10, 2004, 06:39:08 AM
I'm not sure what the improvement in functionality is. You might want to check with Philips on that.

I believe that the LPC935 can execute an LPC932 program without changes.

Title: Re: LPC 932 Watchdog
Post by: Andreas Gretsch on March 16, 2004, 01:27:17 AM
Hi

I have a similar Problem. Im working with Flashmagic 1.88 and programming is working fine, except UCFG1. I changed the Bits in LPC900.A51 but after programming the UCFG1 is still in default configuration.

Does Flashmagic not Programm the UCFG1 memory area?

Thanx
Andreas

Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on March 16, 2004, 05:40:56 AM
UCFG1 can only be changed by using the Device Configuration item on the ISP menu. Seems quite a few people think that UCFG1 can be changed in a Hex file - which it can't. I would be interested to know where you got that idea from so I can investigate this misinformation. Thanks!

Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on March 17, 2004, 02:49:33 PM
Version 1.89 of Flash Magic supports setting UCFG1 and the security bits in the hex file, as specified by Keil's start900.a51.

Basically, locate UCFG1 at FFF0H and the security bits starting at FFF8H with one byte per block.

Title: Re: LPC 932 Watchdog
Post by: Bauke Siderius on April 07, 2004, 04:22:44 PM
Hi,

For the LPC932 the Watchdog can not be enabled to run the ISP code. Shortly an improved LPC932 called the P89LPC932A1 will be released. The LPC932A1 will have ISP that supports watchdog feeds. It will also support high speed communications from FlashMagic, that will allow the communications to go up to 115200.
More features of the LPC932A1 will be the byte-erase function in IAP and increased protection for IAP functions that do erase or program commands.

Regards,

Bauke Siderius
Title: LPC935: Using The Internal 400 kHz Oscillator As CPU Clock
Post by: John Poore on April 07, 2004, 04:52:32 PM
I'm using the LPC935 and find a possibly related problem: If you select the Watchdog Oscillator 400 kHz as the cpu clock you can no longer communicate with the microprocessor using Flash Magic.
Title: Re: LPC935: Using The Internal 400 kHz Oscillator As CPU Clock
Post by: Andy Ayre on April 09, 2004, 09:33:30 AM
Because 400kHz is very slow, the baud rate you use also has to be very low to match. I tested using the LPC935 on an MCB900 board clocked from the Watchdog oscillator and found that I could connect only at 600 baud. To use this speed you will need to directly enter "600" into the Baud Rate box in section 1 of the Flash Magic window. The value in the Oscillator Frequency box is not used so can be anything.

Let me know if this solves your problem.

Title: Re: LPC935: Using The Internal 400 kHz Oscillator As CPU Clock
Post by: John Poore on April 27, 2004, 12:44:03 PM
Andy,

Yes, this does solve the problem.

It is worth noting that with the 7.373 MHz oscillator selected, Flash Magic only works at 9600 baud. With the 400 kHz oscillator selecteselected, Flash Magic only works at 600 baud. This applies to selecting clock and other features, erasing, and programming.

John Poore
Title: Re: LPC 932 Watchdog
Post by: Bauke on April 28, 2004, 09:01:02 PM
Hi,

The LPC935 supports watchdog feeds in the ISP code, also the LPC934 and LPC933.
Soon there will also be an LPC932A that wil support watchdog feeds in the ISP code.
The reason the LPC932 and LPC932A are named differently is so that it can show up in distribution systems as a different part that people can order.

Regards,

Bauke
Title: Re: LPC 932 Watchdog
Post by: Thmas on June 09, 2004, 08:40:55 AM
May i ask a question?
Where can i get the Watchdog Sample code?
I looking for Watchdos for long time.
Any one can help me.

greeting
Thmas
Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on June 09, 2004, 10:06:01 AM
Go to:

www.codearchitect.org/philips

select your device and select "Watchdog".

Title: Re: LPC 932 Watchdog
Post by: Thmas on June 10, 2004, 06:40:48 AM
Hi Andy,

Thank you for your reply.

I still have a question.
I tried many times to Enable Watchdog
(Use the Sample code at "www.codearchitect.org/philips"), but it is not successuful to use Watchdog.
May i ask you how to use the Watchdog more detial?

example: Enable Watchdog sequence ect..

The following Code whether Enable Watchdog?
Ps i have Enabled the UCFG1 -->WDTE = 1
main()
(
watchdog_init();
watchdog_start();
while(1)
{
   Flag = 1;             //Just turn on the LED
   watchdog_feed();
}
   
)


void watchdog_init(void)
{
  bit eacopy;
  WDL = 0xFF;
  eacopy = EA;
  EA = 0;
  WDCON = 0xE4;
  WFEED1 = 0xA5;
  WFEED2 = 0x5A;
  EA = eacopy;

}
void watchdog_feed(void)
{
  bit eacopy;
  eacopy = EA;
  EA = 0;
  WFEED1 = 0xA5;
  WFEED2 = 0x5A;
  EA = eacopy;
}

void watchdog_start(void)
{
  bit eacopy;
  eacopy = EA;
  EA = 0;
  WDCON |= 0x04;
  WFEED1 = 0xA5;
  WFEED2 = 0x5A;
  EA = eacopy;
}
void watchdog_stop(void)
{
  bit eacopy;
  eacopy = EA;
  EA = 0;
  WDCON &= ~0x04;
  WFEED1 = 0xA5;
  WFEED2 = 0x5A;
  EA = eacopy;
}


I am appreciate to you.

Greeting
Thmas
Title: Re: LPC 932 Watchdog
Post by: Andy Ayre on June 10, 2004, 08:52:31 AM
Thmas,

This isn't the correct place for a discussion on Code Architect, so please Email me your reply to the following. My Email address is below.

1. How did you configure the watchdog? Which clock souce and what time out period before reset?
2. If using CCLK (which it looks like you are) how fast is your clock source and what did you enter into the Code Architect form?
3. How are you determining that the device is resetting?

Title: Re: LPC 932 Watchdog
Post by: Thmas on June 11, 2004, 11:04:51 AM
Hi, Andy

Thank you for your support.
I will sent Email to your account.
I am very appreciate to you.

Best regards,
Thmas