FM and lpc935 3 pulses reset

Started by roelofh, June 02, 2006, 05:06:54 AM

Previous topic - Next topic

roelofh

Hi all,

I am new to this forum and offcourse I do have a question.

I have made a pcb with a 89lpc935 on it. This uC should
be programmed by means of ISP. I have shameless copied
the mcb900 circuit and adapted it at some points to counter
negative voltages produced by the PC serialport. The dtr and
rts line do control resp. the power and reset line.
I put some LEDs on the pcd to see what is going on.

Now the problem : I can not initialize the flash embedded
bootloader anymore. Apparently the first time it worked
and I could program (some non working) code into flash.
But now it is dead even when I manually try to get the lpc935
into bootloader mode. No reaction after sending "U" :-(
So the bootvector and or the bootstatus bit is upset.

In my trials to get things working again I noticed the LED which
is connected to the rts (reset) line. It does not toggle three
times after pushing the start button in FM. This also goes for
the LED which is connected to the rxd line (data from the PC).

Is this observation correct ?

Is there another way to get the bootloader going except for
the notouch method ?

TIA,

roelof

erikm

adapted it at some points to counter
negative voltages produced by the PC serialport.
that "stinks" that you do believe the urban legend "a MAX232 3V equivalent is not needed


Apparently the first time it worked
and I could program (some non working) code into flash.
But now it is dead
The "first time" with a chip it is already in ISP mode so, programmable once means that the "kick into ISP" does not work

I noticed the LED which is connected to the rts (reset) line. It does not toggle three times after pushing the start button in FM
these pulses are too short for you to see with a LED, use a scope.

Is there another way to get the bootloader going except for the notouch method ?
too late, NoTouch MUST ne installed while the download works.

Erik

erik

roelofh

Well the rs232<->ttl level converter is there, it is the sp3223 from Sipex.
I meant the negative voltages on the NOR gate inputs. Sorry, I did not
make that very clear.

Even with a scope I did not see the pulses. I also adjusted the 120 ms
to 1 sec orso, but that must mean the time between the pulses :-(

No notouch anymore possible, so I have to desolder the lpc935 and
exchange it with a working/fresh one.

Thanks.

roelof

roelofh

So now I replaced the lpc935 with a fresh one and FM is once
again detecting and reading the uC :-)

But it still leaves me with the question what I did wrong in the
first programming cycle with FM and the lpc935.
As it appears to me that the complete bootloader is gone
from flash and I do not have a way to check it. I mean I do
not have a suitable parallel programmer that can handle
the lpc935.

Now I have to figure out how to get back in to the bootloader
reliable after programming even with non working code.

roelof

Andy Ayre

Devices come from the factory so they reset into ISP mode - i.e. the status bit is set. Only after you have programmed them for the first time are you really testing your ISP entry method.

Therefore I suggest you download the Flash Magic application note on ISP entry using the handskaking signals. In there is a description of the MCB900 circuit with waveforms. You can use this to debug it.

The pulses are very fast - too fast to see on an LED. You need an oscilloscope.

Embedded Systems Academy, Inc.
support at esacademy dot com

roelofh

> Devices come from the factory so they reset into ISP mode - i.e. the status
> bit is set. Only after you have programmed them for the first time are you
> really testing your ISP entry method.

Yes, I noticed that :-)


> Therefore I suggest you download the Flash Magic application note on ISP
> entry using the handskaking signals. In there is a description of the MCB900
> circuit with waveforms. You can use this to debug it.

Allready got that and used it as a basis for my own adapter board
that goes in between the PC serialport and the application board.


> The pulses are very fast - too fast to see on an LED. You need an
> oscilloscope.

As I wrote in an earlier posting, I did not see the pulses with the scope.
Now I soldered a new lpc935 on the app. board and FM v3 can at least
read the bits and all by selecting an option out of the ISP pulldown menu.

roelof

Je Gold

Hardware entry method as discussed in the Flashmagic manual.... shows that 3 pulses 50uS each are required on the /RST line just after Vdd power up.

I had some difficulty using a digital scope to monitor the 3 pulses and get them to trigger on the scope as there is an initially power up pulse which pre triggers the scope........  but I did manage to play around with the trigger settings to finally trigger and see the pulses as decribed in the LPC935 manual and FLashmagic.

And yes - I got ISP hardware entry going.

Becuase the pulses are so fast on the Vdd, /RST and other lines....  capacitance and inductance must be removed .... so they don't slow the edges of the pulses....

Vdd , RST and other signals must maintain their rise time requirements
(so I removed the filter caps - my previous thinking was sprinkle filter caps around on the Vdd lines for digital logic decoupling etc..... but this only applies when the micro is runing in an application).


It is my understanding that Flashmagic and Keil - worked together to build a circuit that can produce the 50uS pulses... using the TxD line and some logic.... the TxD then switches back to normal serial UART function.


ICP is similar in the fact that 7  pulses of 50uS are required to put the LPC900 parts in to ICP mode.


You problem is a common one in which flashmagic have provided the programming doc.

Regards
JG

erikm

why, oh why, do you guys not just install NoTouch (and 'the backdoor")

there will be no problems with timing, no problems with capacitances, no problem with inductances ....

Erik

erik

Je Gold

It is a problem because it is not clear in the Philips doc's how NoTouch will benefit the designer....

Perhaps they don't see the NoTouch articles on Flashmagic  

But after they have tried to program a few chips, send questions to this forum...

The fist thing designers want to do is to "shoe horn" some code in to an LPC900 micro and make an LED blink....  without RTFM (Reading the flaming manual) or reading all the NoTouch and other programming doc's.

Some of the older  LPC900 FLashmagic articles relate to older silicon revision and this may also confuse 1st timers with the LPC900 programming.

Perhaps the same question on the same issue needs to be documented or address in otherways - that will limit the same questions about 1st time programming experinces with the LPC900.


This is why I recommend the MCB900 dev kit which works out of the box.


JG

erikm

It is a problem because it is not clear in the Philips doc's how NoTouch will benefit the designer....

there is no "Philips doc" on my idea, (there should be).

I agree that many will 'lose' a chip, but the buy another, they are not THAT expensive, install NoTouch and live happily ever after.

A note: NoTouch for lpc93x is not very much documented, but NoTouch is.

Erik

erik