From ace500869d1f5e54c3b7605c81f1321d5523c3d9 Mon Sep 17 00:00:00 2001 From: henryk Date: Wed, 5 Dec 2007 16:30:04 +0000 Subject: Add a kludge to make repetitive sends working. For some obscure reason the first transfer of subsequent transmissions (32 sample-bits, equalling 2 data-bits) gets lost. It does work if I just give the same TX buffer to the PDC twice (once after starting the TX PDC). git-svn-id: https://svn.openpcd.org:2342/trunk@374 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/ssc_picc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'openpicc/application/ssc_picc.c') diff --git a/openpicc/application/ssc_picc.c b/openpicc/application/ssc_picc.c index 7e02ec6..1332905 100644 --- a/openpicc/application/ssc_picc.c +++ b/openpicc/application/ssc_picc.c @@ -289,6 +289,7 @@ void ssc_tx_start(ssc_dma_tx_buffer_t *buf) u_int32_t start_cond; /* disable Tx */ + AT91F_PDC_DisableTx(tx_pdc); AT91F_SSC_DisableTx(AT91C_BASE_SSC); /* disable all Tx related interrupt sources */ @@ -315,6 +316,7 @@ void ssc_tx_start(ssc_dma_tx_buffer_t *buf) AT91F_SSC_EnableIt(ssc, AT91C_SSC_ENDTX); /* Enable DMA */ AT91F_PDC_EnableTx(tx_pdc); + AT91F_PDC_SetTx(tx_pdc, buf->data, num_data); /* Start Transmission */ #ifndef USE_SSC_TX_TF_WORKAROUND AT91F_SSC_EnableTx(AT91C_BASE_SSC); -- cgit v1.2.3