diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-13 15:26:14 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-13 15:26:14 +0000 |
commit | 3fb02f719f0bea99548a6bc7fe7c37e9d25ce800 (patch) | |
tree | 3742ace743afdd9d30fe5dc1602b5b557b1e6981 /openpicc/application/tc_fdt.c | |
parent | ee1f021427f8966fb29e70eab1a3be4345af65b1 (diff) |
Slight progress, still: enabling tc_fdt crashes the processor after some bits
git-svn-id: https://svn.openpcd.org:2342/trunk@326 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_fdt.c')
-rw-r--r-- | openpicc/application/tc_fdt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/openpicc/application/tc_fdt.c b/openpicc/application/tc_fdt.c index 55da9ca..0193863 100644 --- a/openpicc/application/tc_fdt.c +++ b/openpicc/application/tc_fdt.c @@ -29,11 +29,14 @@ * */ +#include <FreeRTOS.h> +#include <task.h> #include <lib_AT91SAM7.h> #include <AT91SAM7.h> #include "dbgu.h" #include "openpicc.h" +#include "led.h" #include "tc_cdiv.h" #include "tc_fdt.h" @@ -54,6 +57,8 @@ void tc_frame_end_set(u_int16_t count) static void tc_fdt_irq(void) { + portSAVE_CONTEXT(); + vLedSetGreen(1); u_int32_t sr = tcfdt->TC_SR; DEBUGP("tc_fdt_irq: TC2_SR=0x%08x TC2_CV=0x%08x ", sr, tcfdt->TC_CV); @@ -77,6 +82,9 @@ static void tc_fdt_irq(void) DEBUGP("Compare_C "); } DEBUGPCR(""); + AT91F_AIC_AcknowledgeIt(); + vLedSetGreen(0); + portRESTORE_CONTEXT(); } void tc_fdt_print(void) @@ -123,4 +131,3 @@ void tc_fdt_init(void) tcfdt->TC_IER = AT91C_TC_CPAS | AT91C_TC_CPBS | AT91C_TC_CPCS | AT91C_TC_ETRGS; } - |