[P89LPC935] How to enter ISP mode correctly by firmware

Started by DB1BMN, November 28, 2006, 09:34:49 AM

Previous topic - Next topic

Andy Ayre

Are you sending a string to the device to enter ISP mode or a break condition? You must choose one or the other.

The Start Bootrom feature is covered in the Flash Magic manal in detail. In there it describes that the command must be echoed back to Flash Magic followed by a ".". However you can disable the echo by using the commands provided.

Embedded Systems Academy, Inc.
support at esacademy dot com

DB1BMN

Good evening,

then I did not found the right part yet in the docu.
Yes my program parses all serial communiaction and when a string "/BOOT" is received the programm jumps to the routine above and sets the Bits BR in the SSTAT-Register and EBRR in AUXR1.
So I must before send simply the String "/BOOT." back?

How to disable the echo

Andy Ayre

Please see section 6.10 Start Bootloader in the manual. It should answer all your questions.

Embedded Systems Academy, Inc.
support at esacademy dot com

DB1BMN

Good Evening,

ok sorry, I´m a little bit stupid. Firstly I thought, you mean the chapter 6 of the controller manual, but it deals about Power Monitoring Functions. Then I found the FlashMagic manal and there are quite good information. OK, I´ve learned, thet after sending the /BOOT-command my controller has to do the IAP-calls setting the Boot-Status-Byte to 1 and then has to reset. After reset it will run the ISP-firmware. OK, so far it does.
When I do this with an external terminal-program, I send "/BOOT<CR><LF>". My controller echoes then to me "/BOOT.<CR><LF>", so I dit unterstand that it has to echoe the dot "." after ther command. It does! So then I can do the operations FlashMagic provides: BlankCheck, and of course program new hex-file. So far if I use an externe Terminal Program.
BUT, if I do so with the FlashMagic´s "Start Bootloader"-function, there is still the error "Start BootROM command - "." incorrectly echoed", but my program is echoing the dot! So what does FM exactly expect here?

Regards, Marek

Andy Ayre

If you send /BOOT<cr><lf> then Flash Magic expects /BOOT<cr><lf>.

Try this:

&04/BOOT

Flash Magic should not expect a response back from the device.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

DB1BMN

Hi Thank You,

yes that was it, my PRINT-rutines always appende <CR><LF> to each string passed, so that the dot was also followed by cariage return, that was wrong, now I´ve corrected it and it works. I do not need anymore jump the jumper :-)
But never the less, will now add an "real" echo function to my firmware.
Thanks again.

Regards, Marek