diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-12-11 18:48:39 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-12-11 18:48:39 +0000 |
commit | d88d1207732a80156b5d2725b4c22869ef0b3d36 (patch) | |
tree | a0dceb6733080b96640398b0d72150606ec2985c /openpicc/application/ssc_picc.c | |
parent | 8c1bae59f57cd2cffe13234aee94c2b7aa08e8dd (diff) |
Several modifications to enable spinning until the correct phase is reached in tc_fdt (thereby taking the phase information from tc_fdt, resetting the phase in tc_cdiv)
Still too much jitter (some bug in this code?)
git-svn-id: https://svn.openpcd.org:2342/trunk@383 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_picc.c')
-rw-r--r-- | openpicc/application/ssc_picc.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/openpicc/application/ssc_picc.c b/openpicc/application/ssc_picc.c index 10beaab..3da1dbe 100644 --- a/openpicc/application/ssc_picc.c +++ b/openpicc/application/ssc_picc.c @@ -302,6 +302,17 @@ out_set_mode: * by the fiq handler to see whether to start the transmitter. */ #define USE_SSC_TX_TF_WORKAROUND volatile u_int32_t ssc_tx_pending = 0; + +/* This is the time that the TF FIQ should spin until before SWTRG'ing the tc_cdiv. + * See fdt_timing.dia. Note: This means transmission is broken without USE_SSC_TX_TF_WORKAROUND */ +volatile u_int32_t ssc_tx_fiq_fdt_cdiv = 0; +/* This is the time that the TF FIQ should spin until before starting the SSC + * There must be enough time between these two! */ +volatile u_int32_t ssc_tx_fiq_fdt_ssc = 0; +#ifndef USE_SSC_TX_TF_WORKAROUND +#error Transmission is broken without USE_SSC_TX_TF_WORKAROUND, see comments in code +#endif + void ssc_tf_irq(u_int32_t pio); void ssc_tx_start(ssc_dma_tx_buffer_t *buf) { @@ -613,8 +624,8 @@ void ssc_rx_init(void) AT91F_SSC_EnableIt(ssc, AT91C_SSC_OVRUN | AT91C_SSC_ENDRX | AT91C_SSC_RXBUFF); #endif - /* FIXME: This is hardcoded for REQA 0x26 */ - tc_fdt_set(ISO14443A_FDT_SHORT_0); + /* Will be set to a real value some time later */ + tc_fdt_set(0xff00); AT91F_AIC_EnableIt(AT91C_ID_SSC); |