Flash Magic Forum

In-System Programming Support => LPC9xx/LPC9xxx => Topic started by: Helmuth Lechner on March 17, 2006, 04:34:27 AM

Title: ISP break detect mode
Post by: Helmuth Lechner on March 17, 2006, 04:34:27 AM
Hallo!
Who has an explanation of my regarded problems. I used the MCB900 board from KEIL and programmed the device LCP932 via break detect mode. This happens without any problems. If i start the same procedure without the handshake signals DTR and RTS there is no response from the LPC922. The short circuits for DTR-DSR and RTS-CTS (DSUB7-8/DSUB1-4-6) is made equal is made at MCB900 board. The start sequence
Title: Re: ISP break detect mode
Post by: erikm on March 17, 2006, 06:27:28 AM
i do not understand what you actually are saying, but why do you not just use NoTouch and all these problems becomes distant memories.

Erik

Title: Re: ISP break detect mode
Post by: Andy Ayre on March 17, 2006, 06:35:00 AM
NoTouch I think is a better approach. Relying on correct configuration of the UART to get back into ISP mode is a bit risky. If you want some example code to do it, see www.codearchitect.org and check the "enable break detect" option.

Title: Re: ISP break detect mode
Post by: Helmuth Lechner on March 20, 2006, 12:12:27 AM
O.K. Perhaps I expressed wrong that you understand my problem. Now by other words:
The LPC922 is implemented in my application with his own RS232 converter like the MAX563. My application has only the 2 lines RxD and TxD. With my application software the LPC922 will be driven in the BRAKE DETECT Mode of ISP. And now I want program the LPC922 with Flash Magic as I have done with MCB900.
Why it doesn't work? I see no difference, then by using the BREAKE DEDECT Mode, the RxD-Line must be enough! Or not?
Helmuth
Title: Re: ISP break detect mode
Post by: Andy Ayre on March 20, 2006, 06:38:43 AM
In order for the break detect method to work, the RxD line must be pulled low for two byte periods, and the application must be correctly configured to enable the ISP entry method.

If you use ISP -> Start Bootloader and check the Send Break Condition option, it will ensure that the RxD line is pulled low for whatever baud rate the device is using. Double-check this with a scope on the RxD pin.

If that looks good then check that your application is running.

If it is, then double-check that you configured the UART correctly. Use the code generated by Code Architect (www.codearchitect.org) as an example.

Title: Re: ISP break detect mode
Post by: Helmuth Lechner on March 21, 2006, 09:53:45 AM
Thanks for your hints!
I checked the RxD-line but I don't see the low for 2 bytes. I used the Flash Magic in the BRAKE DETECT Mode. You are sure that the Flash Magic generates the Break contition via RxD?
Helmuth
Title: Re: ISP break detect mode
Post by: Andy Ayre on March 21, 2006, 10:24:35 AM
I tested it when it was implemented, so I believe it works.

Try using a script to trace back the RxD line to the PC com port and see where the signal is not getting through. Let me know what you find.

Title: Re: ISP break detect mode
Post by: Helmuth Lechner on March 22, 2006, 09:21:37 AM
Hi Andy!
I checked again on the RxD-line there is only the two
Title: Re: ISP break detect mode
Post by: Andy Ayre on March 24, 2006, 08:53:35 AM
I just ran a test to double-check this.

Hardware:

MCB900 v4
P89LPC935 rev A

Software:

Flash Magic 2.49

Placed jumper on reset
Programmed in test program that changed the LEDs and supports break detect ISP entry
Placed jumper on Run = program executes, can see LEDs change
In Flash Magic disabled Use DTR and RTS to enter ISP mode
Went to ISP -> Start Bootloader
Selected Send Break Condition
Clicked on Start Bootloader = LEDs went off
Choose ISP -> Read Device Signature = device signature read, in ISP mode

So it seems to work ok. What happens if you follow these steps exactly?

Title: Re: ISP break detect mode
Post by: Andy Ayre on March 24, 2006, 08:58:39 AM
To send the break condition, Flash Magic calls SetCommBreak. See:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/devio/base/setcommbreak.asp

This is independant of any hardware that may be attached.

Title: Re: ISP break detect mode
Post by: Helmuth Lechner on March 26, 2006, 10:43:25 PM
Hi Andrew,
This week starts well! It works perfect along your instruction 03-23-06!!!
Thanks for your cooporation!
Best regards
Helmuth