* [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2)
@ 2009-09-14 9:37 Manuel Sahm
0 siblings, 0 replies; 3+ messages in thread
From: Manuel Sahm @ 2009-09-14 9:37 UTC (permalink / raw)
To: u-boot
Hello,
I?ve already inserted the following code:
In at91sam9g20ek.c:
void thread_test(void)
{
printf("RESET via INT\n");
}
in function :static void at91sam9g20ek_macb_hw_init (void)
{
.......
at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | AT91_RSTC_URSTIEN);
// Reset Bit AT91_RSTC_URSTS
at91_sys_read(AT91_RSTC_SR);
at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_IDCR, 0x01 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_SVR(AT91_ID_SYS), (unsigned int)thread_test);
at91_sys_write(AT91_AIC_SMR(AT91_ID_SYS), 5 | AT91_AIC_SRCTYPE_LOW);
at91_sys_write(AT91_AIC_ICCR, 0x01 << AT91_ID_SYS);
at91_sys_write(AT91_AIC_IECR, 0x01 << AT91_ID_SYS);
.....
}
if I trigger my interrupt - the system hangs....nothing is printed on
screen and I can?t enter anything in the prompt ?
Anything else that I have to add ???
Thanks very much...
Manuel
>>> Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> 05.09.2009
02:49 >>>
On 10:31 Thu 03 Sep , Manuel Sahm wrote:
> Hello,
>
> I have to use interrupts in UBoot 1.3.4 - how could I enable them ?
>
> I have an AT91SAM9G20 - in ist header file I enable CONFIG_USE_IRQ
und
> uncomment the lines#ifdefc CONFIG_USE_IRQ #error .... #endif.
> I inserted the lines:
> #define CONFIG_STACKSIZE_IRQ (4*1024)
> #define CONFIG_STACKSIZE_FIQ (4*1024)
>
>
> In the file (/lib_amr/interrupts.c) I have to insert a function
called
> do_irq().
> I inserted:
>
> void do_irq(struct pt_regs* pt_regs)
> {
> printf("interrupt request\n");
> show_regs(pt_regs);
> bad_mode();
> }
>
> When UBOOT starts all seems to be OK, but if I trigger my interrupt
-
> the system hangs....nothing is printed on screen anmd I can?t enter
> anything in the prompt ?
>
> Could you please help me.... ?
you need to clear the interrupt and add the at91 interrupt controller
to use it
Best Regards,
J.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2)
@ 2009-09-03 8:31 Manuel Sahm
2009-09-05 0:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 3+ messages in thread
From: Manuel Sahm @ 2009-09-03 8:31 UTC (permalink / raw)
To: u-boot
Hello,
I have to use interrupts in UBoot 1.3.4 - how could I enable them ?
I have an AT91SAM9G20 - in ist header file I enable CONFIG_USE_IRQ und
uncomment the lines#ifdefc CONFIG_USE_IRQ #error .... #endif.
I inserted the lines:
#define CONFIG_STACKSIZE_IRQ (4*1024)
#define CONFIG_STACKSIZE_FIQ (4*1024)
In the file (/lib_amr/interrupts.c) I have to insert a function called
do_irq().
I inserted:
void do_irq(struct pt_regs* pt_regs)
{
printf("interrupt request\n");
show_regs(pt_regs);
bad_mode();
}
When UBOOT starts all seems to be OK, but if I trigger my interrupt -
the system hangs....nothing is printed on screen anmd I can?t enter
anything in the prompt ?
Could you please help me.... ?
I have to trigger an interrupt if the Reset Pin is low to disable the
SDRAM Controller and perform a soft reset (It?s a bug in the
AT91SAM9G20).
Thanks a lot
Manuel
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2)
2009-09-03 8:31 Manuel Sahm
@ 2009-09-05 0:49 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 3+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-09-05 0:49 UTC (permalink / raw)
To: u-boot
On 10:31 Thu 03 Sep , Manuel Sahm wrote:
> Hello,
>
> I have to use interrupts in UBoot 1.3.4 - how could I enable them ?
>
> I have an AT91SAM9G20 - in ist header file I enable CONFIG_USE_IRQ und
> uncomment the lines#ifdefc CONFIG_USE_IRQ #error .... #endif.
> I inserted the lines:
> #define CONFIG_STACKSIZE_IRQ (4*1024)
> #define CONFIG_STACKSIZE_FIQ (4*1024)
>
>
> In the file (/lib_amr/interrupts.c) I have to insert a function called
> do_irq().
> I inserted:
>
> void do_irq(struct pt_regs* pt_regs)
> {
> printf("interrupt request\n");
> show_regs(pt_regs);
> bad_mode();
> }
>
> When UBOOT starts all seems to be OK, but if I trigger my interrupt -
> the system hangs....nothing is printed on screen anmd I can?t enter
> anything in the prompt ?
>
> Could you please help me.... ?
you need to clear the interrupt and add the at91 interrupt controller
to use it
Best Regards,
J.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-14 9:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-14 9:37 [U-Boot] Interrupts in uboot with ARM AT91SAM9 (V2) Manuel Sahm
-- strict thread matches above, loose matches on Subject: below --
2009-09-03 8:31 Manuel Sahm
2009-09-05 0:49 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox