From 601081d50a4f4a75c0555a5e13ec6981f7f8ea24 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Mon, 4 Apr 2011 15:20:33 +0000 Subject: [PATCH] Calibrate PN532_UART and ARYGON drivers. --- libnfc/drivers/arygon.c | 5 ++--- libnfc/drivers/pn532_uart.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libnfc/drivers/arygon.c b/libnfc/drivers/arygon.c index f16e98a..378d352 100644 --- a/libnfc/drivers/arygon.c +++ b/libnfc/drivers/arygon.c @@ -177,9 +177,8 @@ arygon_connect (const nfc_device_desc_t * pndd) CHIP_DATA (pnd)->io = &arygon_tama_io; // Timer stops only after 5 bits are received => 5*128 cycles // When sent ...ZY (cmd ends with logical 0): - // TODO: calibration - // 50: empirical tuning - CHIP_DATA (pnd)->timer_correction_zy = 50 - (5 * 128); + // 46: empirical tuning + CHIP_DATA (pnd)->timer_correction_zy = 46 - (5 * 128); // When sent ...YY (cmd ends with logical 1): // a ...ZY signal finishes 64us later than a ...YY signal CHIP_DATA (pnd)->timer_correction_yy = CHIP_DATA (pnd)->timer_correction_zy + 64; diff --git a/libnfc/drivers/pn532_uart.c b/libnfc/drivers/pn532_uart.c index 4d1f24f..f8e7c12 100644 --- a/libnfc/drivers/pn532_uart.c +++ b/libnfc/drivers/pn532_uart.c @@ -162,9 +162,8 @@ pn532_uart_connect (const nfc_device_desc_t * pndd) CHIP_DATA(pnd)->io = &pn532_uart_io; // Timer stops only after 5 bits are received => 5*128 cycles // When sent ...ZY (cmd ends with logical 0): - // TODO: calibration - // 50: empirical tuning - CHIP_DATA (pnd)->timer_correction_zy = 50 - (5 * 128); + // 48: empirical tuning + CHIP_DATA (pnd)->timer_correction_zy = 48 - (5 * 128); // When sent ...YY (cmd ends with logical 1): // a ...ZY signal finishes 64us later than a ...YY signal CHIP_DATA (pnd)->timer_correction_yy = CHIP_DATA (pnd)->timer_correction_zy + 64;