problem with lpc2148

I just got my lpc2148 shipped in but when i connect the device on my pc the curser starts moving and i cannot stop it. Here’s a video showing it : http://www.youtube.com/watch?v=0IWa9omOtew

I tried other pc’s differend OS’s but all the same problem. Do you guys think its defect? Thanks in advance!

Probably the software flashed on the board emulates a mouse. If so the “defect” will disappear once you re-flash the board.

Giovanni

Well im unable to reflash couse the LPC2000 flash utility 2.2.0 doesnt support lpc2148. Version 2.2.2 should have solved this but i cannot find it anywhere. Flash magic gives me the message : "Unable to communicate. (in use) Ensure no other applications are using the COM port. Try raising or lowering the baud rate. Im 100% sure ive selected the correct port (port 4). The hardware list shows Libusb-win32 Devices/Memory acces so i guess the drivers are installed correctly. I tried every setting but all give the same result. I would be very grateful if you helped me out. Tia!

Greetz ToBbErT!

A guy just told me that flashing the device through usb is not possible. He advised to buy a jtag cable. Is that info correct?

It is only possible to flash an LPC2148 if you use a secondary bootloader, which you will have to find, or write yourself. Do a search for TNKERNAL for one example.

NXP no longer supports their flash utility, and Flash Magic is the replacement.

When Flash Magic reported that the COM port was in use did you have the Terminal program running? I believe there is also a command line utility lpc21isp that will use the serial bootloader like Flash Magic, so you might try it instead, but Flash Magic should work, and I have used it on an LPC2148.

What are you doing to put the LCP2148 into program mode? You need to pull pin P0.14 low before reset, and hold it low until after reset is pulled back high. Then try programming it.

Well recently a guy hacked the xbox 360 and now im trying to do the same for my 360. I need to read data from the nand chip thats located on the mobo. Tiron a hacker wrote a .hex file that i need to flash to the lpc2148 in order to get it working. Any idea how i can get the job done with little expierence? Maybe download bootloader? Writing a bootloader is way to much for me. I cant even write a simple program like “hello world” :slight_smile:

And i dont know what a terminal program is. I know im a complete noob im srry.

Then use Flash Magic, which uses the internal serial bootloader. If it doesn’t work, you have done something wrong, or the part is damaged.

Are you using a real serial port, or a USB one. USB serial ports can be problematic, so if possible use a real one.

Im using this cable http://img.2dehands.be/f/normal/3588999 … 2-0-3m.jpg

And ive ordered this one http://cgi.ebay.nl/ws/eBayISAPI.dll?Vie … 0288677538

Now that I have looked at the video, the device is emulating a mouse. Do you have it plugged in via serial or USB? If you want to flash new code you will have to use the serial port.

If you are plugged in via the serial port, and it is emulating a mouse, then your computer detected it as a mouse, and is now locking the port so that Flash Magic cannot get at it (hence the communication error). You need to tell your machine to not use the device as a mouse before you will be able to flash it.

tobbert:
Im using this cable http://img.2dehands.be/f/normal/3588999 … 2-0-3m.jpg

Yes that would be the wrong cable to flash the device.

tobbert:
And ive ordered this one http://cgi.ebay.nl/ws/eBayISAPI.dll?Vie … 0288677538

This should work, but setting up JTAG is likely much more difficult than using Flash Magic with a serial cable.

What board are you using for this?

Do you mean motherboard of my xbox 360? Its a xenon.

Ive allready soldered everything an this is the only thing thats holding me back :frowning:

No, what board do you have with an LPC2148 on it?

I only have the lpc2148 nothing more.

If that is the case, then how did you connect it to a USB cable. I would think that it is mounted on some sort of board. There are quite a few pins that must be connected correctly to get this all to work.

Just to explain what im trying to do :

Here’s a picture that shows the setup of the xbox 360 and lpc2142 http://img10.imageshack.us/img10/1839/lpc2148.jpg

I solder wires from the xbox 360 motherboard to the lpc2148 and then connect the lpc2148 to my pc with a usb cable. Then i can read the nand and flash it with a program called nandpro200.

Here’s where i got all the info : http://www.xboxhacker.net/index.php?topic=12222.0

I really appreciate that you take the time to answer my nub questions :slight_smile:

Hello tobbert,

Heh. That moving mouse cursor freaked me out when I first plugged in my Olimex LPC2148 header board also. Then I thought it was kinda neat…

The flash bootloader only works with a serial connection to UART0 (pins 18 and 21 on the 2148 chip). The USB port on the header board is connected directly to the dedicated USB pins 10 and 11. The built in bootloader does not work with those pins, or with the built in USB port.

In order to flash your device, you have two main options:

  1. Purchase (or build) a JTAG interface and use openocd (or commercial equivalent) to flash the part. Sparkfun has 3 to choose from.

  2. Cobble together a level shifter and connector to use your regular flash utility (or better, use the PGM-00714 that Sparkfun has already cobbled together for you).

IMO the jtag adapter would be the better choice if you might do any debugging in the future.

I didn’t look closely at the project page. It is possible to include a “secondary bootloader” in a flashed program that would allow re-flash of the rest of the chip via the built-in USB port. Not too likely that Tiros has included that in his xbox nand flash utilty but who knows. Even if he has, you still must get that code info your device by method 1 or 2.

I wonder why he needs to use P0.28 and P0.29 from the EXT2 connector. You should request that he modify his code to use pins on the EXT1 connector if at all possible. That would allow you to have a single IDC connector to your 2148 header board.

-Hugh

Thx for the info! I will try when i get the products.

i’m a master student developing a activity monitoring system. this system is suppose to be put into a 2cmx4cm space. so size matter a lot to me. that’s why i choose LPC2138 as my microcontroller. i prefer not to use Jtag or Ulink. to save money, i just want to reconfirm again a few question before i purchase anything,

1)to programme the LPC2138, i just need to buy a LPC Serial Port Boot Loader Interface, PGM-00714, installed Flash magic into my PC, that’s all right??(i will draw pcb for LPC2138, it will function as it’s socket, then from there, i connect it to the PGM-00714. After that, i write programme in flash magic, then connected the pc with the PGM-00714, by this way i can programme the LPC2138, am i right??)If not, please tell me in short, what else i need, thank you very much.

2)LPC2148 has one feature that LPC2138 dont have that is USB 2.0 Full-speed compliant device controller with 2 kB of endpoint RAM.is this very important or does this feature giving a lots of advantage?? I dont understand at all what it means. but no matter how, it doesnt help in programming the microcontroller, right??(i feel the microcontroller’s price is still affordable, if LPC2148 is more recommended than LPC2138, then, i dont mind buy LPC2148)

3)my pc dont have RS232, and i think no one around me has either, should i buy a usb to RS232 adapter to connect my pc to the PGM-00714? will the adapter affect the programming? or any suggestion that how should i solve this problem??

4)i havent decided what data storage should i choose in my system. since the size have to be very small, and the storage had to be more than 5g, and the power consumption had to be low, may i know anyone have any good suggestion??

i’m really new in this field. hope to hear all your advice. thank you very much.

Pretty sure I did see some Olimex programmers that ran off USB… the catch with using USB serial devices I’ve found is that in time sensitive applications (programming can be one of these) the procedure trips over the 2msec latency inherent in USB.

I remember them working okay for things like serial consoles but we had a few glitches with a Lego Mindstorms kit with one, and I remember it being shear bedlum with a Rabbit RCM4000 core module at uni.

Devices that are USB, tend to be properly designed to handle this… if the programmer relies at all on bit banging, USB will present a timing challenge which can be worked around by slowing the process down, but otherwise will be glitchy.