EmbeddedRelated.com
Forums

those crazy interrupts (2138)

Started by WadeA & RebeccaM Smith March 10, 2009
--- In l..., "WadeA & RebeccaM Smith" wrote:
>
> My sediments (or is that sentiments) exactly.
>
> Do you have a suggestion?
>
> Initially I want:
> Timer0
> RTC
> Uart0 Comm to outside world
> Uart1 Comm to Pololu Low Voltage Dual Serial Motor Controller
>
> Later I want
> i2c i/o
> spi i/o
>
> Possibly AD and PWM later, but there arent too many pins avaiable on the 24 or 48 pins coming out (NewMicros Tini2138 has 24 pins Pluga2138 has 48 pins).

IME, if you use ctl_set_isr, ctl_unmask_isr etc then, as others have said, you should not get bogged down in these stroppy interrupts.

I have had no problem with the interrupts on my Crossworks/LPC2129 system. To my great relief, the interrupt handlers for UARTs, CAN, timers, capture/match all worked just about straightaway. Sure, there were crashes afterwards due to my bugs, but the actual entry/exit from the handlers just worked. Even my FIQ interrupt for the SPI/SD card worked, (OK, with help from the experienced engineers in this group:). I do not use the A/D at the moment.

I do use the ctl OS, but from others' posts, the above 'ctl' calls work fine without the ctl kernel, (not really surprising, since they just set up the interrupts).

If you are not too old, you *should* be able to get the interrupts going reliably before you snuff it

Be sure to make a will and leave all your bugs to the taxman.

Rgds,
Martin

An Engineer's Guide to the LPC2100 Series

SUCCESS!

I took the Crossfire2138 UART example and got both UARTs running.
I added the Crossfire2138 timer example (sets up both timers) and then added the RTC. No muss, no fuss.

It works just like you said. All this AND I haven't even reached retirement age yet! 8-)

wade

--- In l..., "mjames_doveridge" wrote:
>
> --- In l..., "WadeA & RebeccaM Smith" wrote:
> >
> > My sediments (or is that sentiments) exactly.
> >
> > Do you have a suggestion?
> >
> > Initially I want:
> > Timer0
> > RTC
> > Uart0 Comm to outside world
> > Uart1 Comm to Pololu Low Voltage Dual Serial Motor Controller
> >
> > Later I want
> > i2c i/o
> > spi i/o
> >
> > Possibly AD and PWM later, but there arent too many pins avaiable on the 24 or 48 pins coming out (NewMicros Tini2138 has 24 pins Pluga2138 has 48 pins).
>
> IME, if you use ctl_set_isr, ctl_unmask_isr etc then, as others have said, you should not get bogged down in these stroppy interrupts.
>
> I have had no problem with the interrupts on my Crossworks/LPC2129 system. To my great relief, the interrupt handlers for UARTs, CAN, timers, capture/match all worked just about straightaway. Sure, there were crashes afterwards due to my bugs, but the actual entry/exit from the handlers just worked. Even my FIQ interrupt for the SPI/SD card worked, (OK, with help from the experienced engineers in this group:). I do not use the A/D at the moment.
>
> I do use the ctl OS, but from others' posts, the above 'ctl' calls work fine without the ctl kernel, (not really surprising, since they just set up the interrupts).
>
> If you are not too old, you *should* be able to get the interrupts going reliably before you snuff it Be sure to make a will and leave all your bugs to the taxman.
>
> Rgds,
> Martin
>

So what's different? Why does it work?

--jc

On Thu, Mar 12, 2009 at 7:50 AM, WadeA & RebeccaM Smith
wrote:

> SUCCESS!
>
> I took the Crossfire2138 UART example and got both UARTs running.
> I added the Crossfire2138 timer example (sets up both timers) and then
> added the RTC. No muss, no fuss.
>
> It works just like you said. All this AND I haven't even reached retirement
> age yet! 8-)
>
> wade
> --- In l... ,
> "mjames_doveridge" wrote:
> >
> > --- In l... , "WadeA &
> RebeccaM Smith" wrote:
> > >
> > > My sediments (or is that sentiments) exactly.
> > >
> > > Do you have a suggestion?
> > >
> > > Initially I want:
> > > Timer0
> > > RTC
> > > Uart0 Comm to outside world
> > > Uart1 Comm to Pololu Low Voltage Dual Serial Motor Controller
> > >
> > > Later I want
> > > i2c i/o
> > > spi i/o
> > >
> > > Possibly AD and PWM later, but there arent too many pins avaiable on
> the 24 or 48 pins coming out (NewMicros Tini2138 has 24 pins Pluga2138 has
> 48 pins).
> >
> > IME, if you use ctl_set_isr, ctl_unmask_isr etc then, as others have
> said, you should not get bogged down in these stroppy interrupts.
> >
> > I have had no problem with the interrupts on my Crossworks/LPC2129
> system. To my great relief, the interrupt handlers for UARTs, CAN, timers,
> capture/match all worked just about straightaway. Sure, there were crashes
> afterwards due to my bugs, but the actual entry/exit from the handlers just
> worked. Even my FIQ interrupt for the SPI/SD card worked, (OK, with help
> from the experienced engineers in this group:). I do not use the A/D at the
> moment.
> >
> > I do use the ctl OS, but from others' posts, the above 'ctl' calls work
> fine without the ctl kernel, (not really surprising, since they just set up
> the interrupts).
> >
> > If you are not too old, you *should* be able to get the interrupts going
> reliably before you snuff it
> >
> > Be sure to make a will and leave all your bugs to the taxman.
> >
> > Rgds,
> > Martin
> >
>


As Martin said, "if you use ctl_set_isr, ctl_unmask_isr etc"...

I took the bare bones examples from Rowley and put them all together and the Rowley magic in "ctl_*()" works as advertised.

Now, why didn't *MY* version with VIC calls and "__attrribute..." work?
I dunno. THAT was my original question. *I* thought what I had should have worked. It didn't, so I came crying to this wonderful, helpful group for help. And after many vain attempts, I threw it all out and started over.

I got the 2 uarts working, added the two timers and added RTC and then added my Serial Motor driver. It works!

Maybe some day when I feel real morbid I may try to get the "manual" version of setting up the VIC, etc working. Which would be nice it I wanted to abandon Rowley libraries and go GCC all the way.

But that would lead me to Eclipse and I have "issues" with the current version that I downloaded. (I can set up a new project but I cannot find how to modify it nor add to it. But I'll look through the archives before I ask THAT question.)

wade

--- In l..., "J.C. Wren" wrote:
>
> So what's different? Why does it work?
>
> --jc
>
> On Thu, Mar 12, 2009 at 7:50 AM, WadeA & RebeccaM Smith
> wrote:
>
> > SUCCESS!
> >
> > I took the Crossfire2138 UART example and got both UARTs running.
> > I added the Crossfire2138 timer example (sets up both timers) and then
> > added the RTC. No muss, no fuss.
> >
> > It works just like you said. All this AND I haven't even reached retirement
> > age yet! 8-)
> >
> > wade
> >
> >
> > --- In l... ,
> > "mjames_doveridge" wrote:
> > >
> > > --- In l... , "WadeA &
> > RebeccaM Smith" wrote:
> > > >
> > > > My sediments (or is that sentiments) exactly.
> > > >
> > > > Do you have a suggestion?
> > > >
> > > > Initially I want:
> > > > Timer0
> > > > RTC
> > > > Uart0 Comm to outside world
> > > > Uart1 Comm to Pololu Low Voltage Dual Serial Motor Controller
> > > >
> > > > Later I want
> > > > i2c i/o
> > > > spi i/o
> > > >
> > > > Possibly AD and PWM later, but there arent too many pins avaiable on
> > the 24 or 48 pins coming out (NewMicros Tini2138 has 24 pins Pluga2138 has
> > 48 pins).
> > >
> > > IME, if you use ctl_set_isr, ctl_unmask_isr etc then, as others have
> > said, you should not get bogged down in these stroppy interrupts.
> > >
> > > I have had no problem with the interrupts on my Crossworks/LPC2129
> > system. To my great relief, the interrupt handlers for UARTs, CAN, timers,
> > capture/match all worked just about straightaway. Sure, there were crashes
> > afterwards due to my bugs, but the actual entry/exit from the handlers just
> > worked. Even my FIQ interrupt for the SPI/SD card worked, (OK, with help
> > from the experienced engineers in this group:). I do not use the A/D at the
> > moment.
> > >
> > > I do use the ctl OS, but from others' posts, the above 'ctl' calls work
> > fine without the ctl kernel, (not really surprising, since they just set up
> > the interrupts).
> > >
> > > If you are not too old, you *should* be able to get the interrupts going
> > reliably before you snuff it
> > >
> > > Be sure to make a will and leave all your bugs to the taxman.
> > >
> > > Rgds,
> > > Martin
> > >
> >
> >
> >
>
>

An understanding of what happens when an interrupt is serviced will certainly help -- as will peeking into the startup file.

Jeff

--- In l..., "WadeA & RebeccaM Smith" wrote:
>
> As Martin said, "if you use ctl_set_isr, ctl_unmask_isr etc"...
>
> I took the bare bones examples from Rowley and put them all together and the Rowley magic in "ctl_*()" works as advertised.
>
> Now, why didn't *MY* version with VIC calls and "__attrribute..." work?
> I dunno. THAT was my original question. *I* thought what I had should have worked. It didn't, so I came crying to this wonderful, helpful group for help. And after many vain attempts, I threw it all out and started over.
>
> I got the 2 uarts working, added the two timers and added RTC and then added my Serial Motor driver. It works!
>
> Maybe some day when I feel real morbid I may try to get the "manual" version of setting up the VIC, etc working. Which would be nice it I wanted to abandon Rowley libraries and go GCC all the way.
>
> But that would lead me to Eclipse and I have "issues" with the current version that I downloaded. (I can set up a new project but I cannot find how to modify it nor add to it. But I'll look through the archives before I ask THAT question.)
>
> wade
>
> --- In l..., "J.C. Wren" wrote:
> >
> > So what's different? Why does it work?
> >
> > --jc
> >
> > On Thu, Mar 12, 2009 at 7:50 AM, WadeA & RebeccaM Smith
> > wrote:
> >
> > > SUCCESS!
> > >
> > > I took the Crossfire2138 UART example and got both UARTs running.
> > > I added the Crossfire2138 timer example (sets up both timers) and then
> > > added the RTC. No muss, no fuss.
> > >
> > > It works just like you said. All this AND I haven't even reached retirement
> > > age yet! 8-)
> > >
> > > wade
> > >
> > >
> > > --- In l... ,
> > > "mjames_doveridge" wrote:
> > > >
> > > > --- In l... , "WadeA &
> > > RebeccaM Smith" wrote:
> > > > >
> > > > > My sediments (or is that sentiments) exactly.
> > > > >
> > > > > Do you have a suggestion?
> > > > >
> > > > > Initially I want:
> > > > > Timer0
> > > > > RTC
> > > > > Uart0 Comm to outside world
> > > > > Uart1 Comm to Pololu Low Voltage Dual Serial Motor Controller
> > > > >
> > > > > Later I want
> > > > > i2c i/o
> > > > > spi i/o
> > > > >
> > > > > Possibly AD and PWM later, but there arent too many pins avaiable on
> > > the 24 or 48 pins coming out (NewMicros Tini2138 has 24 pins Pluga2138 has
> > > 48 pins).
> > > >
> > > > IME, if you use ctl_set_isr, ctl_unmask_isr etc then, as others have
> > > said, you should not get bogged down in these stroppy interrupts.
> > > >
> > > > I have had no problem with the interrupts on my Crossworks/LPC2129
> > > system. To my great relief, the interrupt handlers for UARTs, CAN, timers,
> > > capture/match all worked just about straightaway. Sure, there were crashes
> > > afterwards due to my bugs, but the actual entry/exit from the handlers just
> > > worked. Even my FIQ interrupt for the SPI/SD card worked, (OK, with help
> > > from the experienced engineers in this group:). I do not use the A/D at the
> > > moment.
> > > >
> > > > I do use the ctl OS, but from others' posts, the above 'ctl' calls work
> > > fine without the ctl kernel, (not really surprising, since they just set up
> > > the interrupts).
> > > >
> > > > If you are not too old, you *should* be able to get the interrupts going
> > > reliably before you snuff it
> > > >
> > > > Be sure to make a will and leave all your bugs to the taxman.
> > > >
> > > > Rgds,
> > > > Martin
> > > >
> > >
> > >
> > >
> >
> >
> >
>