From 7fcc62940d35ae31bdf5e5ebdd5ca55c8f4429c2 Mon Sep 17 00:00:00 2001 From: Min Xu Date: Sat, 25 Oct 2014 20:13:23 +0200 Subject: simtrace: Add heartbeat message to debug console --- firmware/src/simtrace/iso7816_uart.h | 1 + 1 file changed, 1 insertion(+) (limited to 'firmware/src/simtrace/iso7816_uart.h') diff --git a/firmware/src/simtrace/iso7816_uart.h b/firmware/src/simtrace/iso7816_uart.h index beb0b23..070d92a 100644 --- a/firmware/src/simtrace/iso7816_uart.h +++ b/firmware/src/simtrace/iso7816_uart.h @@ -6,3 +6,4 @@ void iso_uart_rst(unsigned int state); void iso_uart_rx_mode(void); void iso_uart_clk_master(unsigned int master); void iso_uart_init(void); +void iso_uart_report_overrun(void); -- cgit v1.2.3 From 9bd1b003a63d61e91db3827c2b66290abc1adf13 Mon Sep 17 00:00:00 2001 From: Min Xu Date: Sat, 25 Oct 2014 20:54:09 +0200 Subject: iso7816_uart.h: add missing #ifdef/endif to avoid multiple inclusion --- firmware/src/simtrace/iso7816_uart.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/src/simtrace/iso7816_uart.h') diff --git a/firmware/src/simtrace/iso7816_uart.h b/firmware/src/simtrace/iso7816_uart.h index 070d92a..1a2b202 100644 --- a/firmware/src/simtrace/iso7816_uart.h +++ b/firmware/src/simtrace/iso7816_uart.h @@ -1,3 +1,5 @@ +#ifndef SIMTRACE_ISO7816_UART_H +#define SIMTRACE_ISO7816_UART_H struct simtrace_stats *iso_uart_stats_get(void); void iso_uart_stats_dump(void); @@ -7,3 +9,5 @@ void iso_uart_rx_mode(void); void iso_uart_clk_master(unsigned int master); void iso_uart_init(void); void iso_uart_report_overrun(void); + +#endif -- cgit v1.2.3 From ab325fc295a23d04f27cc7300b12d2564e4d83e6 Mon Sep 17 00:00:00 2001 From: Min Xu Date: Sat, 25 Oct 2014 20:55:01 +0200 Subject: Ensure to transmit current req_ctx on RESET/VCC events When any of the following events occur: * VCC_PHONE off * nRST * RST we tranmsit the current req_ctx, if there is data pending. This ensures that for any successive data, the ATR flag in the next req_ctx containing the data, not in the previous req_ctx. It also ensures that the ATR is aligned at 0 offset in the new req_ctx, which is an assumption the host software makes but the previous code didn't ensure. Furthermore, we introduce a periodic flushing of any pending but incomplete req_ctx. --- firmware/src/simtrace/iso7816_uart.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'firmware/src/simtrace/iso7816_uart.h') diff --git a/firmware/src/simtrace/iso7816_uart.h b/firmware/src/simtrace/iso7816_uart.h index 1a2b202..c5790c8 100644 --- a/firmware/src/simtrace/iso7816_uart.h +++ b/firmware/src/simtrace/iso7816_uart.h @@ -9,5 +9,7 @@ void iso_uart_rx_mode(void); void iso_uart_clk_master(unsigned int master); void iso_uart_init(void); void iso_uart_report_overrun(void); +void iso_uart_flush(void); +void iso_uart_idleflush(void); #endif -- cgit v1.2.3 From 7e3c9959e1e140753738be9b6d4142f6c2068e3d Mon Sep 17 00:00:00 2001 From: Min Xu Date: Sat, 25 Oct 2014 21:18:03 +0200 Subject: iso_uart: Print more errors, not just overruns --- firmware/src/simtrace/iso7816_uart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/src/simtrace/iso7816_uart.h') diff --git a/firmware/src/simtrace/iso7816_uart.h b/firmware/src/simtrace/iso7816_uart.h index c5790c8..969e6f9 100644 --- a/firmware/src/simtrace/iso7816_uart.h +++ b/firmware/src/simtrace/iso7816_uart.h @@ -2,13 +2,13 @@ #define SIMTRACE_ISO7816_UART_H struct simtrace_stats *iso_uart_stats_get(void); +void iso_uart_report_errors(void); void iso_uart_stats_dump(void); void iso_uart_dump(void); void iso_uart_rst(unsigned int state); void iso_uart_rx_mode(void); void iso_uart_clk_master(unsigned int master); void iso_uart_init(void); -void iso_uart_report_overrun(void); void iso_uart_flush(void); void iso_uart_idleflush(void); -- cgit v1.2.3