From 5ec39e9732ba29d641c37b7739fbc97643ac1b9d Mon Sep 17 00:00:00 2001 From: henryk Date: Wed, 19 Dec 2007 05:04:39 +0000 Subject: New hardware version git-svn-id: https://svn.openpcd.org:2342/trunk@398 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/tc_cdiv_sync.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openpicc/application/tc_cdiv_sync.c') diff --git a/openpicc/application/tc_cdiv_sync.c b/openpicc/application/tc_cdiv_sync.c index 3405ca2..c6d3f47 100644 --- a/openpicc/application/tc_cdiv_sync.c +++ b/openpicc/application/tc_cdiv_sync.c @@ -6,6 +6,7 @@ #include "pio_irq.h" #include "openpicc.h" #include "led.h" +#include "tc_cdiv.h" #define USE_IRQ @@ -39,12 +40,16 @@ void tc_cdiv_sync_reset(void) DEBUGPCRF("CDIV_SYNC_FLOP"); //vLedSetGreen(1); - /* reset the hardware flipflop */ + /* reset the hardware flipflop, this clears FRAME */ AT91F_PIO_ClearOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL); for (i = 0; i < 0xff; i++) ; AT91F_PIO_SetOutput(AT91C_BASE_PIOA, OPENPICC_PIO_SSC_DATA_CONTROL); +#ifdef OPENPICC_MODIFIED_BOARD + /* reset tc_cdiv counter, the cleared frame signal stopped the tc_cdiv clock */ + tc_cdiv_reset(); +#endif } } -- cgit v1.2.3