* [ECOS] Redboot Questions
@ 2001-07-10 2:29 Carlos Camargo
2001-07-10 3:05 ` Jesper Skov
0 siblings, 1 reply; 5+ messages in thread
From: Carlos Camargo @ 2001-07-10 2:29 UTC (permalink / raw)
To: ecos-discuss
Hi all
I'm use redboot and ARM evaluator e7t board.
I want debugg a interrupt program with
CYGNUM_HAL_INTERRUPT_EXT0 using RedBoot, I know that
RedBoot is a ROM monitor so:
Which option (CYGSEM_HAL_ROM_MONITOR or
CYGSEM_HAL_USE_ROM_MONITOR) must include in eCos??
I need include anything more.
Exists any problem with spurious interrupts an CTRL-C
support???
Thanks
Carlos Camargo
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Redboot Questions
2001-07-10 2:29 [ECOS] Redboot Questions Carlos Camargo
@ 2001-07-10 3:05 ` Jesper Skov
2001-07-10 3:28 ` Carlos Camargo
0 siblings, 1 reply; 5+ messages in thread
From: Jesper Skov @ 2001-07-10 3:05 UTC (permalink / raw)
To: Carlos Camargo; +Cc: ecos-discuss
>>>>> "Carlos" == Carlos Camargo <carlos_ivan_camargo@yahoo.com> writes:
Carlos> Hi all I'm use redboot and ARM evaluator e7t board. I want
Carlos> debugg a interrupt program with CYGNUM_HAL_INTERRUPT_EXT0
Carlos> using RedBoot, I know that RedBoot is a ROM monitor so: Which
Carlos> option (CYGSEM_HAL_ROM_MONITOR or CYGSEM_HAL_USE_ROM_MONITOR)
Carlos> must include in eCos??
eCos should have USE_ROM_MONITOR enabled.
Carlos> I need include anything more.
Default config should allow debugging.
Carlos> Exists any problem with spurious interrupts an CTRL-C
Carlos> support???
Not understood.
Jesper
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Redboot Questions
2001-07-10 3:05 ` Jesper Skov
@ 2001-07-10 3:28 ` Carlos Camargo
2001-07-10 3:57 ` Jesper Skov
2001-07-10 10:31 ` Jonathan Larmour
0 siblings, 2 replies; 5+ messages in thread
From: Carlos Camargo @ 2001-07-10 3:28 UTC (permalink / raw)
To: Jesper Skov; +Cc: ecos-discuss
> Carlos> Exists any problem with spurious interrupts
> an CTRL-C
> Carlos> support???
>
> Not understood.
>
> Jesper
My question is:
Due that my interrupt source is EXT0 with the same
vector of spurious interrupt. This have any
problem????
I have the following program:
/****************************************************************
*
* File : counter.c
* Description : Segment Display Programm
* Author : Carlos Camargo
* Date : 22/06/2001
*
****************************************************************/
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <cyg/hal/hal_intr.h>
#include "segment.h"
#define SYSCFG 0x03ff0000
#define IOPMOD ((volatile unsigned
*)(SYSCFG+0x5000))
#define IOPDATA ((volatile unsigned
*)(SYSCFG+0x5008))
#define FOREVER (1)
cyg_thread thread_s[2]; /* space for two thread
objects */
char stack[2][4096]; /* space for two 4K stacks */
cyg_handle_t simple_threadA, simple_threadB; /*
handles for the thread */
cyg_thread_entry_t program_A, program_B; /* variables
for the procedure which is the thread */
cyg_handle_t int_0_ISR_H;
cyg_interrupt intr;
int toggle = 0;
cyg_uint32 int_0_isr(cyg_vector_t
vector,cyg_addrword_t data)
{
/* ISRs must acknowledge the interrupt, or they
might be invoked again */
cyg_interrupt_acknowledge(vector);
return CYG_ISR_CALL_DSR;
}
/* this is the DSR for ext 0 interrupts */
void int_0_dsr(cyg_vector_t vector, cyg_ucount32
count, cyg_addrword_t data)
{
if ( toggle == 0){
cyg_thread_suspend( simple_threadA );
cyg_thread_resume( simple_threadB );
toggle = 1;
}
else {
cyg_thread_suspend ( simple_threadB );
cyg_thread_resume ( simple_threadA );
toggle = 0;
}
}
static unsigned int numeric_display [16] =
{
DISP_0, DISP_1, DISP_2, DISP_3, DISP_4,
DISP_5, DISP_6, DISP_7, DISP_8, DISP_9,
DISP_A, DISP_B, DISP_C, DISP_D, DISP_E,
DISP_F
};
void cyg_user_start(void)
{
// printf("Entering test' cyg_user_start()
function\n");
// printf("Create Thread_A and Thread_B\n");
cyg_thread_create(4, program_A, (cyg_addrword_t)
'A',
"Thread A", (void *) stack[0], 4096,
&simple_threadA, &thread_s[0]);
cyg_thread_create(4, program_B, (cyg_addrword_t)
'B',
"Thread B", (void *) stack[1], 4096,
&simple_threadB, &thread_s[1]);
/* create an interrupt handler with int_0_isr() as
the ISR and int_0_dsr() as the DSR.*/
cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_EXT0, 0,
0, &int_0_isr,
&int_0_dsr, &int_0_ISR_H,
&intr);
cyg_interrupt_attach(int_0_ISR_H);
cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_EXT0);
cyg_thread_resume(simple_threadB);
}
void program_A(cyg_addrword_t data)
{
char message = data;
int seg;
while ( FOREVER ){
for ( seg=0xf; seg>=0; seg--) {
if ( (seg >= 0) & (seg <= 0xf) ){
*IOPDATA &= ~SEG_MASK;
*IOPDATA |= numeric_display[seg];
}
cyg_thread_delay(100);
}
}
}
void program_B(cyg_addrword_t data)
{
char message = data;
int seg;
// printf("Beginning execution; thread data is %c\n",
message);
while ( FOREVER ){
for ( seg=0; seg<=0xf; seg++) {
if ( (seg >= 0) & (seg <= 0xf) ){
*IOPDATA &= ~SEG_MASK;
*IOPDATA |= numeric_display[seg];
}
cyg_thread_delay(100);
}
}
}
/****************************************************************
* END OF counter.c
****************************************************************/
When i run this program from insight The thread
simple_threadB running correctly, but when i press the
external button attach to EXT0, no acurrs any
interrupt.
My code is good, or i have any error.
Thanks
Carlos Camargo
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Redboot Questions
2001-07-10 3:28 ` Carlos Camargo
@ 2001-07-10 3:57 ` Jesper Skov
2001-07-10 10:31 ` Jonathan Larmour
1 sibling, 0 replies; 5+ messages in thread
From: Jesper Skov @ 2001-07-10 3:57 UTC (permalink / raw)
To: Carlos Camargo; +Cc: Jesper Skov, ecos-discuss
>>>>> "Carlos" == Carlos Camargo <carlos_ivan_camargo@yahoo.com> writes:
Carlos> Exists any problem with spurious interrupts
>> an CTRL-C
Carlos> support???
>> Not understood.
>>
>> Jesper
Carlos> My question is:
Carlos> Due that my interrupt source is EXT0 with the same vector of
Carlos> spurious interrupt. This have any problem????
There is no such thing as a spurious interrupt vector. If you get a
spurious interrupt, it's because you haven't attached a handler on
that particular vector.
Carlos> When i run this program from insight The thread simple_threadB
Carlos> running correctly, but when i press the external button attach
Carlos> to EXT0, no acurrs any interrupt.
Carlos> My code is good, or i have any error.
Don't know. I have not tested the use of external interrupts with this
HAL. There might have to be set/cleared some additional interrupt
masks to make it working.
Jesper
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] Redboot Questions
2001-07-10 3:28 ` Carlos Camargo
2001-07-10 3:57 ` Jesper Skov
@ 2001-07-10 10:31 ` Jonathan Larmour
1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Larmour @ 2001-07-10 10:31 UTC (permalink / raw)
To: Carlos Camargo; +Cc: Jesper Skov, ecos-discuss
Carlos Camargo wrote:
>
> /* create an interrupt handler with int_0_isr() as
> the ISR and int_0_dsr() as the DSR.*/
> cyg_interrupt_create(CYGNUM_HAL_INTERRUPT_EXT0, 0,
> 0, &int_0_isr,
> &int_0_dsr, &int_0_ISR_H,
> &intr);
>
>
> cyg_interrupt_attach(int_0_ISR_H);
> cyg_interrupt_unmask(CYGNUM_HAL_INTERRUPT_EXT0);
This does look correct, so this may indeed indicate some bug in the HAL.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-07-10 10:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-10 2:29 [ECOS] Redboot Questions Carlos Camargo
2001-07-10 3:05 ` Jesper Skov
2001-07-10 3:28 ` Carlos Camargo
2001-07-10 3:57 ` Jesper Skov
2001-07-10 10:31 ` Jonathan Larmour
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).