How to programm the cortex-m0 LPC1111 using flash magic without external crystal

Started by nvsandeep, May 12, 2010, 04:59:47 AM

Previous topic - Next topic

nvsandeep

Hi
I am Sandeep we are using COrtex M0 , LPC1111 controller in this controller we have an internal crystal with this internal we can download
the code from LPC XPRESSO but we need to download the code using flash magic latest version in this we are not able to download the hex code without external crystal  , we are able to download a code with external crystal ,but we need to do for downloading the hex code without external crystal please help us.

Thanks in advance
Regards
Sandeep

Andy Ayre

Can you connect to the bootloader using Hyperterminal when using the internal oscillator?

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

nvsandeep

Hi Andy
I am able to connect to Hyperterminal with internal crystal when the code is downloaded via JTAG or flash magic with external crystal( crystal is removed after downloading the code) . I am not able to download a code without external crystal.

Thanks in Advance.
Regards
Sandeep.

Andy Ayre

Yes, but are you able to autobaud with the bootloader using Hyperterminal when using the internal oscillator? The test I am suggesting has nothing to do with JTAG.

Note that there isn't an internal crystal, just a resistor-capacitor based oscillator.

If Hyperterminal can connect what is the Flash Magic error message?

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

nvsandeep

Hi Andy

The error i got is Failed to autobaud.

Now I am able to program using ISP now what i did is opened Terminal in flashmagic from TOOLS>Terminal . this connection established fine after this I tried downloading the code , code downloaded fine.

Thanks for your valuable reply.
Regards
Sandeep.

Andy Ayre

So the Flash Magic terminal works but the rest of the Flash Magic GUI does not?

Please generate a debug file showing your attempt to use the GUI. Instructions are here:

  http://www.flashmagictoo.com/autobaud.html

Then send the file to me.

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

nvsandeep

Hi Andy

Now I am able to download the code with Flash Magic GUI also after Flash magic Terminal communication established fine.

Thank you.
Regards
Sandeep.

Andy Ayre

Can you please post how you solved the problem for the benefit of future readers of this topic? Thanks!

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

nvsandeep

Hi

1). Make sure that Hyperterminal is communicating properly with Internal Oscillator before programming in flash magic GUI.

2). If autobaud error occurs while downloading the hex code, try to communicate with  terminal in flash magic (Tools->Terminal)   if this communication established fine as same Hyperterminal then close (while closing if flash magic doesn't respond properly then kill that process in windows task manager) and reopen flash magic, now hex code can be downloaded easily with Flash magic GUI without external crystal.

Regards
Sandeep.

Andy Ayre

I think something is not quite right with your setup. If you want to investigate this further the first thing to try would be another PC. If the one you are using does not have a COM port then try one with a built in COM port.

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

jim

Hi Andy,

I am having a similar problem and had to use the same remedy, the terminal interface. I still got some communications errors but it was able to re-program OK. The link to log the info for debug was broken, can you send the correct one so I can see what is going on? (and to send a copy to you.) Also, FYI, prior to this I was able to program using SWD. After loading a program, the SWD no longer worked. And, when I tried Flash Magic, I had a autobaud error. So, I think there is something going on with the LPC1114. After erasing, I was able to re-program with SWD. The only thing I can think of (other than a problem with the device) was the CRP3 got set accidently, which is why I want to check the communications log. FYI, I am using Keil tools. Any suggestions you have would be welcome.

Regards,  Jim E.

Andy Ayre

OK, firstly did you set the CRP value? You need to do this in your project. Your Keil startup file might have this in already and set it to zero. You can also double-check this by looking at the hex file. It should be easy to find the values be programmed at the CRP location.

The instructions for generating a debug file are here:

http://forum.flashmagictool.com/index.php?topic=3272.0
Embedded Systems Academy, Inc.
support at esacademy dot com

MarkW

It may well have a bootloader factory programmed into it, but looks like you might
have to search outside of the datasheet for info on that.

Data sheet talks about Serial Wire Debug (SWD) but not JTAG. Two pins for this,
SWDIO and SWCLK. Perhaps it's a derivative of JTAG, I don't know.

This device should be as simple as any to get started with, no doubt easier if you
use an off the shelf dev kit like one of these which seem cheap enough...
http://ics.nxp.com/lpcxpresso/~LPC1114/

I'm just barely getting started with ARM, going with an Olimex LPC-2378STK dev kit
I bought a couple of years ago but just switched on last week. I'm not even at
flashing an LED stage yet, there is quite a learning curve in the tool chain setup etc.