Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Andy Ayre

#2161
Old Topics / Re: P89LPC932 Timer/Counter
August 06, 2003, 02:32:59 PM
For general microcontroller questions, you may have more luck going to the Microcontroller discussion forum at www.philipsmcu.com. This forum is for the discussion of ISP software for Philips Microcontrollers.

When the timer is in modes 0 or 1 the count is stored in THn and TLn where n is the timer number. In modes 2, 3 and 6 the count is stored in TLn.

On the LPC932 datasheet refer to figures 21 - 25 (22 Nov 2002).

#2162
Don - I have forwarded your comment to Philips to see if they can confirm if the WDSE bit is not the cause of the problem.

#2163
A1.

Flash Magic sends a couple of 'U's and looks for the answer. The break or Start BootROM Command is only sent if you tell Flash Magic to send those by choosing Start BootROM from the ISP menu.

Also I wouldn't assume that SFRs are preserved on a reset. In fact on a reset they should be put back to the reset values.

A2.

That is a big assumption. As far as I know, it causes a reset, in which case none of the SFRs are preserved. I could be wrong though, but I definately would not make any assumptions like that.
Most reliable way to sync is 9600 baud.

FM uses the baud rate you tell it to. It does not detect anything. It is up to the LPC932 after reset to detect the baud rate of the 'U'.

A3.

It *should* be ok to enable break detect any time. However, if this is your only means of entering ISP mode on the device, then I strongly recommend that you enable break detect right at the start of your code. Otherwise if there is a mistake in your code that causes the device to do something unexpected, before the break detect is enabled, it may never get enabled.

A4.

You should just be able to enable the break detect and then forget about it. It should not be necessary to disable any interrupts. Note however, that if you have the Watchdog enabled and Watchdog Safety enabled (WDSE) then on reset into ISP mode the ISP will not be able to function.

See www.codearchitect.org/philips for some example UART code that enables break detect.

#2164
Old Topics / Re: Problem of migration
July 16, 2003, 08:24:21 AM
Flash Magic automatically ensures the Boot Vector is programmed to FCH when it has finished programming your device, so you should not need to worry about it any more. Also Flash Magic has safeguards to stop you accidentally reprogramming the Boot Vector to some other value.

Flash Magic 1.31 and later incorporate the additional erases, so this is handled automatically. However, always ensure you have the latest version of Flash Magic.

#2165
This problem only occurs if you enable the Watchdog Safety mode (WDSE bit in UCFG1). When enabled, the watchdog will start after every reset. The ISP code will not feed the watchdog.

Currently the only solution is to not enable the WDSE bit until you are sure you will not need to reprogram the device via ISP.

#2166
Old Topics / Re: Problem of migration
July 15, 2003, 08:04:38 AM
It is not possible to erase the Bootrom, as it is in the metal layer. I.e. It is ROM. However, it is possible to reprogram the Boot Vector so it no longer points to the Bootrom.

Using your parallel programmer, check to make sure the Boot Vector in all the devices is the default of FCH. If you cannot see how to read and write the Boot Vector then please contact the parallel programmer vendor.

If this doesn't help, please Email me.

#2167
Old Topics / Re: ISP problem with RD2
July 14, 2003, 09:34:21 AM
I don't know of anything specific that could be causing your problem, but these devices do feature a watchdog. My recommendation is that you use the watchdog whenever possible to reset the device into the bootrom rather than performing a jump to FC00H. This guarantees that all the SFRs and internal registers and hardware of the device is properly reset.

Set Status Byte
Ensure Boot Vector is set to FCH (which it should be if you have never changed it)
Turn on watchdog
Wait forever

#2168
Old Topics / Re: P89c51 Boot/ISP Code
July 11, 2003, 04:10:46 PM
It is not possible to erase the Bootloader in Philips devices except for the LPC932, however it is possible to program or erase the Boot Vector to an incorrect value, which will stop the device from finding the bootloader. If this is the case then the only solution is to use a parallel programmer to program the Boot Vector back to the default value. If you do not have a parallel programmer then there is no way of recovering the device.

However, not being able to get the device back into ISP mode may be due to a number of things. Incorrect voltages on the necessary pins at reset, defective or static damaged device, incorrect baudrate, I even see people have faulty PC COM Ports.

I suggest that you go to the Flash Magic web page and download the application note on ISP problems. It will take you through a number of steps to try and determine what the problem is. If all else fails, it gives you the procedure to Email me a Flash Magic generated debug file, allowing me to see what is going on with the serial comms.

#2169
Old Topics / Re: FlashMagic and LPC210x, when ?
July 02, 2003, 08:21:38 AM
Currently there are no plans to add the LPC210x's to Flash Magic, however I believe there is an alternative ISP tool available from Philips directly. Please contact Philips for details.



Post Edited (07-02-03 09:31)
#2170
Old Topics / Re: IAP
June 19, 2003, 08:30:26 AM
Which device are you using? If it is the Rx2Hxx, 66x or LPC932, then we have already written the assembler to make it work. You can download it from:

http://www.esacademy.com/faq/progs/flash.htm

For any other devices we currently do not have anything, so you will have to take the closest one of the two libraries and adapt it yourself.

#2171
Old Topics / Re: P89C51RD2
June 13, 2003, 08:16:54 AM
You can find an example schematic diagram in Philips Application Note AN461, available from www.philipsmcu.com.

#2172
Old Topics / Re: 89c664
June 11, 2003, 07:39:54 AM
If you want to use the DTR/RTS functionality, then you must use both signals. It will not work if you just try to use one of them, so if your cable only has four wires then you cannot use that feature.

To disable the DTR/RTS feature:

Choose Advanced Options from Options Menu
Click on the Hardware Config tab
Uncheck all the boxes
Click ok OK.

Now try using the Start BootROM feature. Note that whenever a COM Port is opened in Windows, the DTR and RTS signals are automatically placed in states that indicate the PC is read for transmission. This is Windows control rather than Flash Magic. So if you find that RTS is still changing state whenever you use Flash Magic, you will need to disconnect RTS from your hardware.

#2173
LPC9xx/LPC9xxx / Re: Suggestion LPC932 ISP
June 11, 2003, 07:32:11 AM
Thanks for the suggestion! We are working with Philips to evaluate this and the impact it may have on Flash Magic.

#2174
Old Topics / Re: 89lpc932 does not execute
June 03, 2003, 09:29:35 AM
What happened when you followed the steps in Flash Magic application note 4?

#2175
Old Topics / Re: Modifying the hello program
May 30, 2003, 09:08:08 AM
Try:

printf("\n This is the present amount: %u", W);

This is really standard C. There are a couple of deviations that Keil makes from the standard, but the syntax for printf is basically the same.

You also need braces for your infinate loop:

while(1)
{
  // do stuff here
}

A good book to read (along with the Keil manuals) is:

"The C Programming Language" by Kernighan and Richie.

Note that although I have helped you this time, this is a discussion forum for Flash Magic and WinISP only. Your programming and microcontroller questions would be better posted in one of the following locations:

www. 8052.com
www.philipsmcu.com in the discussion forum