Вы находитесь на странице: 1из 9

Flash Magic Forum

In-System Programming Support => General => Topic started by: Andy Ayre on July 07, 2009, 09:55:29 PM

Title: Failed To Autobaud Post by: Andy Ayre on July 07, 2009, 09:55:29 PM If you are reading this you probably received an error message from Flash Magic telling you that autobauding failed. This is by far the most common problem that people run into and this post will provide some pointers. Read this post entirely before posting a new topic or contacting us for help. Because hardware and microcontrollers vary I will first give you the bad news - there is no magic one-size-fits-all answer to your problem. The solution depends on your situation and you will have to do a bit of investigating and understand what is happening. This is always the case when hardware is involved. For People in India We have a lot of people in India who have difficultly with autobauding. From trying to solve this problem with several people we have come to the conclusion that there are small shops selling microcontrollers that are not brand new and might have an unknown past. Only puchase brand new microcontrollers from authorized NXP distributors, otherwise you might be wasting a lot of your time. Overview of Autobauding What is autobauding? When the ISP bootloader in the microcontroller is started it waits for a special character (called the autobaud character) to be received on UART0. The character used varies depending on the device. Generally 8051 and XA devices use a 'U' while ARM devices use a '?'. When the character is received the bootloader uses it to measure the baudrate you are using in Flash Magic. It then configures UART0 to use the same baudrate. Finally it sends a response back to Flash

Magic. In 99.9% of cases the error you are getting is caused by Flash Magic not receiving a response from the microcontroller. What could cause this? Some possible reasons are:

Using wrong COM port Serial cable is faulty or not connected to PC and RS232 transceiver on your hardware You are using a USB to RS232 cable which doesn't work properly A USB driver is causing problems There is a bad solder joint on your hardware stopping the autobaud character from arriving at UART0 RXD The ISP bootloader failed to start The microcontroller cannot execute code because of no running oscillator, insufficient power supply, glitches on the power supply, etc. The baud rate you are using is too high or too low You are using a P89V51Rx2 or P89LV51Rx2 and the autobaud character is not being sent in time

Let's examine each of these in turn and how you can check them. They are in no particular order. Using wrong COM port Make sure you are using the correct COM port. If you are using a USB to RS232 cable or Future Designs USB interface then unplug the cable, go to Control Panel -> System -> Hardware-> Device Manager -> Ports (COM & LPT) and see which COM ports are available. Then plug your cable back in and see which new one appears. Serial cable is faulty or not connected to PC and RS232 transceiver on your hardware Put an oscilloscope on the RIN pin of the RS232 transceiver. Click on Start in Flash Magic and watch for the autobaud character. If it doesn't appear then try a different PC and serial cable. Try putting the oscilloscope on the COM port connector on your PC and checking there.

Check for an electrical connection between the ground, TXD and RXD pins of the cable at each end. Note that a problem with the ground can stop communications from working (Thanks Jan for this one). If you don't have an oscilloscope then get one. They are required for developing with embedded systems and are necessary to see what is happening in the circuit. Without one you will run into constant problems and frustration that will waste days of your life. You are using a USB to RS232 cable which doesn't work properly We have had a LOT of reports of problems with these cables. Some work well and some don't. There is no list of what does and doesn't work. This would be one one of the things we would suspect. Obtain a PC with a COM port. It is also possible to buy PCI cards with COM ports for desktop PCs. A USB driver is causing problems If you are using a USB to RS232 cable or Future Designs USB interface and you have tried the above, then try the following steps: Go to Control Panel -> System -> Hardware Tab -> Device Manager Expand Ports (COM & LPT) in the list Right click over the COM port assigned to your USB cable Choose "Uninstall" from the menu Unplug the cable and plug it back in Go through the driver installation steps If that doesn't help then try: Go to Control Panel -> System -> Hardware Tab -> Device Manager Expand Ports (COM & LPT) in the list Right click over the COM port assigned to your USB cable Choose "Properties" from the menu Click on the Port Settings tab then Advanced... Choose a new COM port number, for example COM17. Don't pick one that it says is in use, even if it really isn't in use. Click on OK then OK. Unplug your USB cable and plug it back in. Make sure the cable is assigned the new COM port number There is a bad solder joint on your hardware stopping the

autobaud character from arriving at UART0 RXD Put an oscilloscope on the RXD pin of the microcontroller. If the pin is not accessible put the scope on the RXD signal as close as possible to the pin. Click on Start in Flash Magic and watch for the autobaud character. If it doesn't appear then start checking at various points in the circuit working your way from the microcontroller to the RS232 transceiver. The ISP bootloader failed to start This is a common cause. The user manual for your device will describe all the conditions necessary to start the bootloader. You must check and make sure all of them are being met. Measure voltages and timing at the pins of the microcontroller. The microcontroller cannot execute code because of no running oscillator, insufficient power supply, glitches on the power supply, etc. Check all electrical aspects with an oscilloscope and make sure your circuit meets the AC and DC specifications in the data sheet for the microcontroller. The baud rate you are using is too high or too low The baud rates that can be used to communicate with the bootloader vary depending on the frequency of the oscillator being used. It is recommended to use at least 10MHz and 9600 baud. Try different baud rates. However the bootloader will only attempt to autobaud once after a reset so be sure to reset it between attempts. You are using a P89V51Rx2 or P89LV51Rx2 and the autobaud character is not being sent in time These devices are different in how the bootloader is activated and it is important to understand these differences. They are not like other devices with similar names. Do not make assumptions about any particular device and how it works based only on the part number. Read the data sheet and user manual. These devices must receive the autobaud character within a specific time after reset to enable the bootloader. Flash Magic can reset the device for you (with support in the hardware) or you must do it

manually. This setting can be found in Options -> Advanced Options -> Hardware Config. Uncheck/untick the "Use DTR to control RST" for manual resets. When clicking on the Start button a window will open telling you to reset the device. While the window is open Flash Magic is sending out a constant stream of autobaud characters. This is when you reset the device. Before attempting to use the DTR option get it working without DTR. This simplifies the situation and reduces the potential for problems. If you still cannot get one of these devices to communicate with Flash Magic then use an oscilloscope to check that a constant stream of 'U's are arriving at the RXD pin of the microcontroller. This will look like a square wave. Then check if anything is being output on the TXD pin. Additional Notes Get the User Manual for your device from http://www.nxp.com/microcontrollers (http://www.nxp.com/microcontrollers) Try communicating with the device using Hyperterminal. Use 8 bits, no parity, 1 stop bit, no flow control. Send the autobaud character and see if anything is echoed back. If it isn't then the problem is likely not with Flash Magic. If communications work with Hyperterminal but not with Flash Magic then a possible cause is in how DTR and RTS are used. For example the Keil MCB900 board requires proper control of DTR to enable the outputs of the RS232 transceiver. Other boards may do something similar. Check the schematic diagram for your board and understand the requirements. Contact the vendor of the board if needed. In Flash Magic under Options -> Advanced Options -> Hardware Config try checking/ticking and unchecking/unticking the "Assert DTR and RTS while COM port open" option to see if that helps. Some users have reported having PCs where DTR and RTS are inverted for some reason. It is always worth trying another PC of a different make or model to see if the problem appears there. A good way of getting to a "known state" is to buy a tried and tested board from places like www.lpctools.com (http://www.lpctools.com). These boards are low cost and if you buy a Keil board then typically

the schematic diagrams are available on www.keil.com (http://www.keil.com). Contact Keil for details on the diagrams. We typically use Keil boards in-house for developing and testing Flash Magic. If you contact us with a problem the first thing we will usually do is grab the appropriate Keil board and test with it. Ultimately the best person in a position to track down and solve the problem is you. You have the PC, microcontroller, cables and hardware in front of you. If you have gone through and checked everything in this posting and still feel you need help then we need a detailed email or posting on this forum with everything you know and understand about the problem. It is difficult for us to diagnose problems remotely and without detailed information your request for help will likely only result in us asking questions. Title: Re: Failed To Autobaud Post by: Andy Ayre on May 12, 2010, 05:02:06 PM These are from Steve H (thanks Steve!): Loopback check serial cable Jumper pins 2 and 3 together then run Hyperterminal and see if you get an echo. If so, most likely your serial port and cabling are working fine. Verify if you need a null modem or straight through cable Some boards will require a null modem, while others need a straight though. It should be stated in the documentation. You sort of allude to this in the "additional notes" section, but you don't come right out and say it.
Powered by SMF 1.1.12 | SMF 2006-2009, Simple Machines LLC

Flash Magic Forum


In-System Programming Support => P89V51Rx2/P89LV51Rx2 => Topic started by: revamp on June 15, 2009, 07:52:31 AM

Title: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 15, 2009, 07:52:31 AM hi, I have been using p89v51rd2 from a long time but when it comes to dumping the code using flash magic,i always get some messages.This time i am getting the message unable to communicate,try reducing the baud rate. i have tried changing each component,i changed the board along with microcontroller,i tried unchecking use dtr and rts option also but none of these are working. I am struck here from 3 days,help me Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 15, 2009, 11:56:07 AM i had selected the wrong device....but after selecting the right device, i am getting error - reset the device into isp mode now what am i suppose to do Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 15, 2009, 12:07:39 PM hi, Finally i programmed the device,i have unchecked the use dtr rts option in advanced options and when it displays the warning reset the device into isp mode now,i disconnected power and after a second,i connected the power and it displayed a warning stating that the connected device is wrong and asks yes or no,i clicked on yes

and it worked Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: Andy Ayre on June 15, 2009, 04:27:42 PM If you to go ISP -> Read Device Signature what do you get? Andy Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 17, 2009, 12:53:45 PM when i try to read device signature, again i get the message reset the hardware into ISP mode now. once i was successfull. but later when i tried again,i couldn do it. Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: Andy Ayre on June 17, 2009, 05:04:20 PM Flash Magic is struggling to get the device to echo back the autobaud character. The ISP entry on these devices can be tricky and you might want to consider switching to one of the new devices, such as the P89CV51RD2 which uses a pin to enter ISP mode. Andy Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 22, 2009, 09:29:38 AM Dear Andy, I thanku very much for answerin my queries, I finally resolved it, now its working fine, all i did was uncheckin the use dtr option in advanced settings and unchecked erase all flash and selected erase flash used by hex. thats all.I hope this might help some one. Once again Thanku Andy.

Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: revamp on June 29, 2009, 09:59:41 AM Dear Andy, I have another problem now. I have flashed a code into 8051 which uses serial communication. but when i want to flash another code, i get the error message as UNABLE TO COMMUNICATE(RECEIVE/TRANSMIT).ENSURE NO OTHER APPLICATIONS ARE USING THE COM PORT. Title: Re: unable to connect at specified baud rate ,try reducing baud rate Post by: Andy Ayre on June 29, 2009, 03:35:38 PM Windows thinks another program is using the COM port - perhaps the program you are testing your serial communications with? This happens when Windows rejects Flash Magic's request to open the COM port. Please start a new topic when posting new questions. Thanks. Andy
Powered by SMF 1.1.12 | SMF 2006-2009, Simple Machines LLC

Вам также может понравиться