Author Topic: LPC1788 - Autobaud step 1 error after successful flashing  (Read 14888 times)

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
LPC1788 - Autobaud step 1 error after successful flashing
« on: August 19, 2013, 05:51:12 am »
Hi,

I am trying to flash LPC1788 using flash magic. Following is what happened.

1. Initially i set the baud rate to 115200. I was getting Autobaud step 1 error.
2. Then I reduced the baud to 9600 and then at least the erase memory happened. However it started giving error "Failed to send data..."
3. After a lot of going through different settings, finally using 38400 and 120 clk, it successfully wrote the memory.
4. However after that no repeat writing is going good and its continuously raising Autobaud step 1 error  even for the 38400 baud which got successful before.

Fortunately i was trying all that with debug mode. Please find attached the debug files. However the debug file has become 534 KB which has the successful trial as well. I am attaching the latest unsuccessful trial one.

I can email that previous debug file with one successful flashing upon request.

Look forward to your help.

Regards,

Alok Damle.

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #1 on: August 19, 2013, 06:56:11 am »
After a few more trials i could get successful flashed again. unfortunately the debug file with failed as well as successful attempt this time is 145 Kb which is still more than the limit of 128 kb. :( So I can email the same if required.

So essentially this thing is working some time and sometime not. After comparing the successful and unsuccessful data with a serial port monitor, I realized the sending data is failing at one particular point where an OK is not being received. Rest communication happens fine.

Can you please suggest why this intermittent issue?

Look forward to your help.


Regards,

Alok

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #2 on: August 19, 2013, 07:07:31 am »
Finally figured out the sequence for successful flashing.

1. Start flash magic.
2. Make sure "use DTR and RTS to control RST and ISP pin: is cheched and "Keep RTS asserted which COM Port open" is also checked.
3. Then switch to debug "press F1"
4. Then say start and it works.

Now the only issue is if next attempt is made to write again, then it fails. So after pressing F1 it "ONLY WORKS ONE TIME."

If I need to do another successful flashing, i have to close the application completely and then restart and follow the above four steps. (step 2 can be skipped).

Although I have a solution now, I would still prefer if this need for starting the application again and again is not there.

Hence help required.

Attached is the latest file which is less than 128 kb.

Regards,

Alok

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #3 on: August 19, 2013, 08:07:28 am »
It looks like you turned half-duplex on. You don't need that so please turn it off.

Am I right in understanding that it only works if debug mode is turned on? I.e. it does not work at all with debug mode turned off?

Your hardware must need RTS to be asserted for proper operation and without that perhaps there is insufficient current or some other electrical issue? Or it could be by design.

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

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #4 on: August 19, 2013, 09:21:30 am »
Hi Andy,

Thanks for your response,


Yes I realized that the half duplex was also causing some issues when i checked the data over serial port monitor. Hence i turned it off.

And yes I don't remember flashing successfully happening without debug mode. However the inconvenient part is that after turning the debug ON it happens ONLY ONCE. And then it starts giving "Failed to send data" error. I tried pressing F1 again just for the sake of it. However no luck. I need to close the application and restart it again in order to be able to flash it again.

Have you encountered similar situation before?

Regards,

Alok.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #5 on: August 19, 2013, 09:46:04 am »
No, we haven't.

Please generate a debug file during the failed to send data error - I didn't see that in the files you've already generated.

What happens if you press F2 to turn debug mode off?

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

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #6 on: August 19, 2013, 09:50:37 am »
Ooh i did not know about F2. Shall try that tomorrow as I am out of lab now. Shall update. And will also send you the debug file of failed error if I encounter it. I do have some failed files. however the file size is large.

Do you mind if I send it to your email?

Regards,

Alok.

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #7 on: August 20, 2013, 05:45:12 am »
Hi Andy,

Well the F2 did work. That is after pressing the flashing happens for once. The further trials fail. Then when I press F2 and Then F1 again, the flashing happens.

So at least now the procedure for flashing has following steps.

1. Start application,
2. Press F1.
3. Flash
4. Press F2.

Better than restarting the application.

I am attaching the three files that were created today.

One of them must have a failed entry. However the first entries in each one will be a successful one because thats what is happening.

Let me know if you are able to find specific reason to this.

Regards,

Alok

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #8 on: August 20, 2013, 07:21:49 am »
The debug files are only generated in debug mode, so if the problem only happens when debug mode is off then it's not captured.

I thought that the problem was this:

1. Start FM
2. Press F1
3. Flash - succeeds
4. Flash - fails

because you wrote "However the inconvenient part is that after turning the debug ON it happens ONLY ONCE. And then it starts giving "Failed to send data" error".

If this is the case please send a debug file of that. The three you have posted show no problems.

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

AlokDamle

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #9 on: August 20, 2013, 10:21:46 am »
That's strange. Cause it must have captured.

All that i did change today is that i unchecked the "Verify after write" check box so that the debug files are smaller. And I did encounter the subsequent failed attempts while in debug mode. I thought they got captured as well.

Is there a possibility that the debug mode is switching off after one successful write and hence even when the screen shows debug mode, the data is not getting captured?

To give you more insight I can do a screen capture and can create a small video. But I am afraid I wont be able to attach that.

Let me see if I can create the video and send you a link to see it.

Shall update tomorrow.

Regards,

Alok.

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2190
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1788 - Autobaud step 1 error after successful flashing
« Reply #10 on: August 21, 2013, 02:33:47 am »
I double-checked your debug files. They look perfect - no issues at all. Debug mode doesn't switch off.

The only difference that turning the debug mode on makes is that it will slow down the application slightly, but that should not make a difference to it's operation as it always waits for the device to respond before proceeding. As we don't have reports of this from anyone else it makes me think that it is specific to your PC somehow.

Perhaps try a different serial cable or put a scope on the RxD and TxD lines and see if there is a difference in the waveforms between debug on vs off?

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