I'm using the LPC2129 and Keil Tools. The purpose of the code is to
interrupt on the receipt of a single byte of data and assign data to
its value. The interrupt seems to work however data isn't the right
value. Please help, Thanks.
Reply by Alexey Bishletov●October 11, 20062006-10-11
8:40:35 AM, Wednesday, October 11, 2006, lehighuboy wrote:
> I'm using the LPC2129 and Keil Tools. The
purpose of the code is to
> interrupt on the receipt of a single byte of data and assign data to
> its value. The interrupt seems to work however data isn't the right
> value.
How do you check it? What are the results?
> int data;
May be
volatile int data;
could help.
WBR, Alex
Reply by lehighuboy●October 11, 20062006-10-11
Thank you for the response.
I tried the volatile tag, however no change occurred.
After some reading I added the following:
U1FCR = 0x07; //Enables and Resets FIFO, 1 byte
Still no change ...
I'm watching the values in the debugger window. "data" should vary from
0x0 to 0xFF, instead there is sporadic change from 0x30 to 0x37.
Reply by lehighuboy●October 11, 20062006-10-11
Thank you for the response.
I tried the volatile tag, however no change occurred.
After some reading I added the following:
U1FCR = 0x07; //Enables and Resets FIFO, 1 byte
Still no change ...
I'm watching the values in the debugger window. "data" should vary
from 0x0 to 0xFF, instead there is sporadic change from 0x30 to 0x37.
--- In l..., Alexey Bishletov wrote: >
> 8:40:35 AM, Wednesday, October 11, 2006, lehighuboy wrote:
>
> > I'm using the LPC2129 and Keil Tools. The purpose of the code is to > > interrupt on the receipt of a single byte of data
and assign data to > > its value. The interrupt seems to work however data
isn't the right > > value.
>
> How do you check it? What are the results?
>
> > int data;
>
> May be
>
> volatile int data;
>
> could help.
> WBR, Alex
>
Reply by Robert Adsett●October 11, 20062006-10-11
At 04:40 AM 10/11/2006 +0000, lehighuboy wrote: >I'm using the LPC2129 and Keil Tools. The purpose
of the code is to
>interrupt on the receipt of a single byte of data and assign data to
>its value. The interrupt seems to work however data isn't the right
>value. Please help, Thanks.
>
>void U1ISR(void) __irq {
>
>U1IIR |= 0x01; /* Clear Interrupt */
IIR is a ready only register. You keep rewriting the FIFO control register.
An object lesson in the usefulness of const volatile.
Actually, it seems odd that Kiel didn't use const volatile.
From the Divided by a Common Language File (Edited to protect the guilty)
ME - "I'd like to get Price and delivery for connector Part # XXXXX"
Dist./Rep - "$X.XX Lead time 37 days"
ME - "Anything we can do about lead time? 37 days seems a bit high."
Dist./Rep - "that is the lead time given because our stock is live.... we
currently have stock."
Reply by lehighuboy●October 11, 20062006-10-11
Thanks.
How do I clear the interrupt?
--- In l..., Robert Adsett
wrote: >
> At 04:40 AM 10/11/2006 +0000, lehighuboy wrote:
> >I'm using the LPC2129 and Keil Tools. The purpose of the code is to
> >interrupt on the receipt of a single byte of data and assign data to > >its value. The interrupt seems to work however data
isn't the right
> >value. Please help, Thanks.
> >
> >void U1ISR(void) __irq {
> >
> >U1IIR |= 0x01; /* Clear Interrupt */
>
> IIR is a ready only register. You keep rewriting the FIFO control register. >
> An object lesson in the usefulness of const volatile.
>
> Actually, it seems odd that Kiel didn't use const volatile.
>
> Robert
>
> http://www.aeolusdevelopment.com/
>
Reply by Robert Adsett●October 11, 20062006-10-11
At 01:40 AM 10/12/2006 +0000, lehighuboy wrote: >--- In l..., Robert Adsett
>wrote:
> >
> > At 04:40 AM 10/11/2006 +0000, lehighuboy wrote:
> > >I'm using the LPC2129 and Keil Tools. The purpose of the code is to
> > >interrupt on the receipt of a single byte of data and assign data
>to
> > >its value. The interrupt seems to work however data isn't the right
> > >value. Please help, Thanks.
> > >
> > >void U1ISR(void) __irq {
> > >
> > >U1IIR |= 0x01; /* Clear Interrupt */
> >
> > IIR is a ready only register. You keep rewriting the FIFO control
>register.
> >
> > An object lesson in the usefulness of const volatile.
> >
> > Actually, it seems odd that Kiel didn't use const volatile.
> >
>Thanks.
>
>How do I clear the interrupt?
That depends on the source. There is a table in the user manual that lists
what actions are required for each source.
As a matter of interest, did Keil really leave the const off of the IIR
definition?
Robert
Another sign of the end of civilization, our technical magazines are
getting chatty
From an EETimes product descriptions 2006/08/09
".... systems that can sample gobs of inputs simultaneously"
Now just what is the technical definition for gobs again? http://www.aeolusdevelopment.com/
Reply by lehighuboy●October 11, 20062006-10-11
Thanks. I deleted my question because I figured there was a section in
the user manual. At any rate with the interrupt clearing resolved, it
still doesn't work ...
--- In l..., Robert Adsett wrote:
> >Thanks.
> >
> >How do I clear the interrupt?
>
> That depends on the source. There is a table in the user manual that lists > what actions are required for each source.
>
> As a matter of interest, did Keil really leave the const off of the IIR > definition?
>
> Robert
--- In l..., "lehighuboy"
wrote: >
> Thanks. I deleted my question because I figured there was a section in > the user manual. At any rate with the interrupt
clearing resolved, it > still doesn't work ...
>
> --- In l..., Robert Adsett wrote: >
> > >Thanks.
> > >
> > >How do I clear the interrupt?
> >
> > That depends on the source. There is a table in the user manual that > lists
> > what actions are required for each source.
> >
> > As a matter of interest, did Keil really leave the const off of the > IIR
> > definition?
> >
> > Robert
>
Reply by Robert Adsett●October 12, 20062006-10-12
At 02:29 AM 10/12/2006 +0000, lehighuboy wrote: >Thanks. I deleted my question because I figured there
was a section in
>the user manual. At any rate with the interrupt clearing resolved, it
>still doesn't work ...
I didn't take a close look at everything. IIR just rather popped out at
me.
Take a look at the examples in the files section. There are also examples
in the newlib-lpc library.
Robert
" 'Freedom' has no meaning of itself. There are always
restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew
a radio signal. " -- Kelvin Throop, III http://www.aeolusdevelopment.com/