Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jan Waclawek

#181
LPC9xx/LPC9xxx / Re: Boot loader Jump
May 20, 2005, 09:24:30 AM
Get the NoTouch for LPC935 (the file not by Erik) from this site, the asm code is somewhat commented there. You need also get the user manual for LPC935 and read the IAP section; there is a table with IAP functions, so you will see there why loading those registers etc.
And it should work with LPC932A1 (whereas Erik's works only with the older LPC932).

But, I am still curious, if you are with Philips (even if being a student), couldn't you get these informations from "inside"?

Jan Waclawek
#182
LPC9xx/LPC9xxx / Re: Boot loader Jump
May 20, 2005, 02:39:18 AM
Oh yes, that's a better solution (provided that the boot vector is intact, i.e. 1Fh). But note, that the IAP entry point (PGM_MTP) has changed for the LPC932A1 to FF03h.

You can also envoke a software reset, setting bit 3 of AUXR1.

Jan Waclawek
#183
From the PC point of view:

1. The standard PC 16C550-compatible UART can generate only integer fractions of 115200 baud.
2. FM probably uses the Win API to set the baudrates, which is designed in a very unfortunate way, allowing only a even more limited choice of baudrates from the wider selection according to 1. (Andy can correct me).
3. The drivers of FTDI USB-RS232 chip allow to "fake" a different baudrate for a given WinAPI setting, e.g. you can have a real 31500 baud (if the FTDI chip allows it, but it generates the baudrates dividing from several megaherts so probably you can get close enough) when setting it to 9600 baud (from any application). There might be other USB-RS232 convertors or RS232 cards available with similar properties of their drivers.

From the microcontroller point of view:

The reliability of autobauding and following communication depends on particular combination of . You can read more at http://www.efton.sk/t0t1/autobaud_error.htm .


Generally:

You can design your own down/up convertor using a microcontroller with double UART (or any similar solution), buffering in both directions. Then you can possibly connect from PC using a different baudrate (e.g. 38400 baud) and to the mcu using your desired 31500 baud.


Jan Waclawek
#184
LPC9xx/LPC9xxx / Re: Boot loader Jump
May 19, 2005, 09:02:21 AM
Hummm...   LJMP 1F00h?!
(except maybe some of the SFRs might need setting to their initial value; I would at least set SP to 07h and disable all interrupts).

But, wait a moment, is the IP address of your computer really ---.pixs.philips.com???

Strange things happen today...

Jan Waclawek
#185
LPC9xx/LPC9xxx / Re: How to save the HEX file?
May 19, 2005, 08:56:45 AM
OK so I finally wired up a P89LPC932A1 (they are sitting quietly in my drawer since I bought them three months ago... simply have no time for my hobbies) to a piece of protoboard and started one of my favorite terminal programs and... guess... it works, so it's there. Of course, set the security bit and it reads nothing (returns all zeros).

Btw, a surprise for me, the erased part reads all zeros (not FFs)!

Jan Waclawek
#186
LPC9xx/LPC9xxx / Re: How to save the HEX file?
May 12, 2005, 02:31:34 PM
OK so you have already scheduled it? :-D

(Btw. could you ask Philips, why is it not documented? The sourcecode of bootloader is published.)

Jan Waclawek
#187
LPC9xx/LPC9xxx / Re: How to save the HEX file?
May 12, 2005, 01:17:44 PM
Andy:
Yes, however neither Philips nor ESAcademy supports undocumented features. Use with caution - there might be reasons why it wasn't documented.

Of course; it's just an answer to the OP. He can try himself, using any terminal emulator.

Jan Waclawek
#188
LPC9xx/LPC9xxx / Re: How to save the HEX file?
May 12, 2005, 12:34:56 AM
Having a look at the sourcecode  of ISP of LPC9xx (available from Philips website) reveals, that there _is_ a read data feature implemented, it just happened not been mentioned in the documentation...

Jan Waclawek
#189
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
May 12, 2005, 12:32:31 AM
Yes, the P89V51RD2 returns BFh as manufacturer ID and 91h as device ID.
This might have something to do with the remarkable similarity between this part and certain SST parts...

Jan Waclawek
#190
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
May 08, 2005, 02:57:26 PM
To test if P89V51RD2 in in SoftICE mode: get a terminal emulator program capable of sending non-ascii characters (e.g. term by Bray, use google); then reset the mcu and send 11h characters (at some reasonable speed, e.g. 9600baud, 8N1, no handshake). If the mcu responds with alternating 00h and FFh, you are in SoftICE mode.

To get rid of SoftICE mode:
http://www.efton.sk/t0t1/unsoftice.htm

Hope this helps a bit.

Jan Waclawek
#191
P89V51Rx2/P89LV51Rx2 / Re: 89V51RD2
May 03, 2005, 07:14:13 AM
Sud wrote:
>  Can I replace the "C" version with "V" version
> without any software or hardware changes?

Generally, not.
For example, in the "C" you can set the 6-clock mode from software (and you can set the core speed 6-clk while the peripherals 12-clk), while in the "V" you can set the speed to 6-clk only by programming.
An another example, if you are using the IAP, the "C" has a different set of commands and a different way how to approach the IAP routines than the "V".
But in other respects the chips are quite similar, so it really depends on your particular application, whether the "C" can be replaced by the "V" with no changes or not.

Jan Waclawek
#192
Sarsam,

You are on the right track.

The problem might be in this line:

MOV A,TMP3;After GET2 is called it stores the byte to TMP3   XRL A,#34;XOR the data 34(decrypt the data)

If you place the XRL after any ";"  (i.e. after the comment),  it becomes a part of the comment.


Try

        MOV A,TMP3;After GET2 is called it stores the byte to TMP3
   XRL A,#34;XOR the data 34(decrypt the data)
        MOV TMP3,A;move it back to TMP3


Jan Waclawek

#193
The main result of the "many threads" is in fact the following file
http://www.semiconductors.philips.com/files/markets/microcontrollers/Adding%20ISP%20in%20source%20code.zip
which contains the source files of the LPC9xx bootloader.
Yes, it's asm. I am sorry, but if you want to use it, you will need to learn it.
Alternatively, you can write your own bootloader from scrap in C.

Have fun,

Jan Waclawek
#194
You need either to write your own ISP bootloader, or to modify the existing one. The following link might help:
http://www.8052.com/forum/thread.phtml?thread=84899

Jan Waclawek
#195
Note I  have updated for the AES bootloader too.
I would recommend you AES better than DES; it is newer, said to be better and - surprise - more compact, so you spare memory implementing it.
But you can use any encryption scheme you chose.
Note, that you still can be compatible with the style of ISP commands (and you can replace the old bootloader with yours), so you (or your customer) can use FlashMagic for convenient updating of the firmware.

Jan Waclawek

PS. If needed, you can use a different key to DES/AES/whichever encryption scheme you use, for each customer; so the update issued for one woun't work for the other.