LPC932 and Flashmagic initalisation

Started by Joseph Goldburg, July 26, 2003, 11:50:05 PM

Previous topic - Next topic

Joseph Goldburg

Hi All,

Q1 Flash Magic (FM) Start Up
-----------------------------------------

How does FM initialise on start up?

Does FM  send a 'U'  at the baud rate selected and look for an answer?
Does FM  send a BREAK and or  'U' at the baud rate selected?

What is the most reliable way to synchronise the is either ISP mode
with a LPC932?

Q1 FM  and H/W ISP (3 pluses on reset) of the LPC932
-----------------------------------------------------------------------
For H/W ISP setup, what is the status of the SFRs and they set-back to RESET default?  Do the previous values effect the H/W ISP mode (eg DMIV)?

What is the most reliable way to synchronise the LPC932 to FM in this mode.

Q2  FM and  UART BREAK ISP
---------------------------------------

I assume with a UART break ISP mode all the SFRs are preserved? y/n?

Must we assume that FM knows the UART baud rate of the LPC932
when initialising programming / connection?

Can FM or the LPC932 in this ISP mode auto detect the baud rate?

What is the most reliable way to synchronise the LPC932 to FM in this mode?

Q3 UART BREAK ISP anywhere any time
----------------------------------------------------

Assuming the UART is set up correctly but UART break detect is off.
Can the user code turn break detect on at any time with the operation of the code to activate break detection  OR does break detection need to be at the beginning of the code for ISP detect?


Q4 Interupts and Watch Dogs During ISP
------------------------------------------------------
When using UART break detect - is it recommend to disable all  interupts
except the UART and well as the watch dog timer?]

What are the recommended items that should be disabled before going to ISP?


Thanks In Advance

Joseph Goldburg - Feild Applications Engineer Adilam Elelctronics

Andy Ayre

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.

Embedded Systems Academy, Inc.
support at esacademy dot com