summaryrefslogtreecommitdiff
path: root/openpicc/application/tc_cdiv_sync.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-19 05:04:39 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-19 05:04:39 +0000
commit5ec39e9732ba29d641c37b7739fbc97643ac1b9d (patch)
tree353c699bcecf70c7eae5f0709ec6c1f023233c5c /openpicc/application/tc_cdiv_sync.c
parentf89811486cda3de0a28fbad1d9726d8c20a9b155 (diff)
New hardware version
git-svn-id: https://svn.openpcd.org:2342/trunk@398 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/tc_cdiv_sync.c')
-rw-r--r--openpicc/application/tc_cdiv_sync.c7
1 files changed, 6 insertions, 1 deletions
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
}
}
personal git repositories of Harald Welte. Your mileage may vary