I am trying to talk to a device that uses ISO 7816 protocol with T=1. My hardware setup is a micro-controller using USART configured in SIM card mode.I have read the relevant documents but am unclear on what happens after an ATR.
As far as I understand the input frequency is used with initial F=372, D=1 in the ATR. So if my input frequncy is 3.571MHz, the ATR response comes back @ 9600 baud. This is what I have seen on a scope and a TTL cable monitoring the USART. Is this correct?
On looking at the result of the ATR, it shows F=372, D=12. Does this mean that the baud rate for communications to the card is still 9600 baud or should I be sending all messages after receiving the ATR @ the baud rate parameters returned i.e. 115 kbaud? It seems PPS works @ 9600 baud but this makes no sense why the F and D is returned for a different baud rate than the interface the card is actually running on.
The answer is most likely no, but does PPS and ATR run at a different baud rate than the rest of the commands for ISO7816?
Yes, the ATR is sent at 9600 baud.
The baud rate stays at 9600 baud, unless and until you send a PPS request to change it. This must be the first command sent to the card. The F and D parameters in the ATR are the maximum values that the card supports -- you can choose lower values. (But the card is not obliged to support all possible intermediate values -- if it rejects these lower values by returning a PPS response with an empty INF field, you can either continue at 9600 baud, or reset the card and try different values.) The PPS response is sent at 9600 baud, and the next command to the card is sent at the new baud rate.
No (or only if you change the baud rate with a PPS request).