summaryrefslogtreecommitdiff
path: root/openpicc
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-27 15:13:46 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-27 15:13:46 +0000
commit48c311bd71544f4bfbf0820024fea2f13b974089 (patch)
treed440785b62abbd14be90ae87982854694727289f /openpicc
parent6549d8861a943b7c341a03901127d84f1fa41131 (diff)
Print relevant SSC registers
Set correct tc_cdiv for sending (FIXME: need to reset before receiving) git-svn-id: https://svn.openpcd.org:2342/trunk@356 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc')
-rw-r--r--openpicc/application/cmd.c15
-rw-r--r--openpicc/application/iso14443_layer3a.c1
-rw-r--r--openpicc/application/ssc_picc.c4
3 files changed, 18 insertions, 2 deletions
diff --git a/openpicc/application/cmd.c b/openpicc/application/cmd.c
index 8c06a3d..b7169f1 100644
--- a/openpicc/application/cmd.c
+++ b/openpicc/application/cmd.c
@@ -263,9 +263,24 @@ void prvExecCommand(u_int32_t cmd, portCHAR *args) {
DumpStringToUSB(" * TC0_CV value: ");
DumpUIntToUSB(*AT91C_TC0_CV);
DumpStringToUSB("\n\r");
+ DumpStringToUSB(" * SSC_SR value: ");
+ DumpUIntToUSB(*AT91C_SSC_SR);
+ DumpStringToUSB("\n\r");
DumpStringToUSB(" * SSC_RCMR value: ");
DumpUIntToUSB(*AT91C_SSC_RCMR);
DumpStringToUSB("\n\r");
+ DumpStringToUSB(" * SSC_TCMR value: ");
+ DumpUIntToUSB(*AT91C_SSC_TCMR);
+ DumpStringToUSB("\n\r");
+ DumpStringToUSB(" * SSC_TFMR value: ");
+ DumpUIntToUSB(*AT91C_SSC_TFMR);
+ DumpStringToUSB("\n\r");
+ DumpStringToUSB(" * SSC_TPR value: ");
+ DumpUIntToUSB(*AT91C_SSC_TPR);
+ DumpStringToUSB("\n\r");
+ DumpStringToUSB(" * SSC_TCR value: ");
+ DumpUIntToUSB(*AT91C_SSC_TCR);
+ DumpStringToUSB("\n\r");
DumpStringToUSB(
" *\n\r"
" *****************************************************\n\r"
diff --git a/openpicc/application/iso14443_layer3a.c b/openpicc/application/iso14443_layer3a.c
index f2fe16e..de928ea 100644
--- a/openpicc/application/iso14443_layer3a.c
+++ b/openpicc/application/iso14443_layer3a.c
@@ -96,6 +96,7 @@ void __ramfunc iso14443_layer3a_irq_ext(u_int32_t ssc_sr, enum ssc_mode ssc_mode
if(ret>0) {
vLedSetGreen(1);
ssc_tx_buffer.len = ret;
+ tc_cdiv_set_divider(8);
ssc_tx_start(&ssc_tx_buffer);
vLedSetGreen(0);
diff --git a/openpicc/application/ssc_picc.c b/openpicc/application/ssc_picc.c
index df0f3f9..de2121d 100644
--- a/openpicc/application/ssc_picc.c
+++ b/openpicc/application/ssc_picc.c
@@ -184,8 +184,8 @@ void ssc_tx_start(ssc_dma_tx_buffer_t *buf)
start_cond = AT91C_SSC_START_RISE_RF;
sync_len = 0;
ssc->SSC_RC0R = 0;
- data_len = 16;
- num_data = buf->len/2;
+ data_len = 32;
+ num_data = buf->len/(data_len/8); /* FIXME This is broken for more than 64 bytes */
ssc->SSC_TFMR = ((data_len-1) & 0x1f) |
(((num_data-1) & 0x0f) << 8) |
personal git repositories of Harald Welte. Your mileage may vary