Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: [lpc2000] Re: UART RX interrupt handlers

2004-02-24 by Alaric B Snell

redsp@... wrote:
> --- In lpc2000@yahoogroups.com, Alaric B Snell <alaric@a...> wrote:
> 
>>Background: I'm writing my LPC21xx FORTH, as before mentioned. It's now 
> 
> 
> Dude!  What would it take to get you to defect over to the OKI ARM
> camp?  I am looking to host Forth on the OKI 67Q5003 ARM mcu.  I am a
> newbie to the ARM and I have not worked with Forth at this level
> before.  So I was looking at using a commercial Forth like MPE.  But
> it will be pretty expensive to buy one complete with a support package
> for a new chip like this.  
> 

What I'm doing probably won't take much porting, and most of that all in 
a small number of places, and I'll open source it so feel free to port 
away, or if you get really desperate, lend me an OKI devel board so I 
can do it ;-)

> I don't think I would use a serial port character for this, it would
> be very dangerous in any real world system.  A wrong baud rate could
> result in any given character being "received".  Given time, the
> system will get hosed.  Instead, I suggest that an input be used to
> indicate on reset what actions to be taken.  A single input pin can be
> used to check for a jumper to ground, a jumper to a Vdd pullup or no
> jumper.  Then a push button reset will boot normally or have two
> levels of recovery from a problem.  

I was trying to avoid needing another I/O pin as being 'special' and, as 
such, being awkward to use - if you want to use P0.14, you need to make 
sure it will remain high for a few ms after /RST rises, if you want your 
system to boot at all...

The Ctrl+C and Ctrl+R won't hose the entire system per se, a reset will 
always bring it back again, it just clears up the current state of RAM.

As it stands I'm putting in a delay of a few ms after installing the 
interrupt handler to allow for a Ctrl+C to get in there before execution 
of code from Flash begins, just in case - one could make the interrupt 
handler ignore Ctrl+C after this period, if so desired, meaning that RxD 
is the special line to be kept in a known state for a few ms after 
reset, rather than a GPIO somewhere.

ABS

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.