Showing results for 
Search instead for 
Did you mean: 

Minimal MCU spec or smallest/cheapest STM32 for implementing ISO7816

Associate II

Hello to all, 

Our design is using STM32F042G6 MCU to implement STSW-STM32011 firmware interface based on STM32Cube which implements ISO7816 protocol for us to talk to smart card. Unfortunately it does not seem to move beyond ATR.

Is our MCU we use not good enough to support this FW, can it support only T=0 without T=1? If not good enough, what is the minimal MCU that would support the above FW or similar for ISO7816 over USART?

Thanks for your help, 



Thank you, we will try to do some more debugging on devkit with T=1 as that is currently not working with T=1 cards for some reason. Did you test mostly with GSM or JAVA or some other cards? Any hints on debugging this?

The new ST darling STM32C0 supports ISO7816 in USART1, according to DS13867.


Probably in all STM32 since 'F0/'F3 there are UARTs which support ISO7816 - ST tends to copy-paste-update the peripherals.

OTOH, within one STM32 model, not all UARTs are full feature so some of them don't support smartcard while others do - read carefully the UART chapter in RM, it usually lists which UARTs have which feature.


I am not sure about this code in AN4800 FW.


in main()

uint32_t cardclk = 0;

Screenshot 2024-02-21 114650.png

Passed to Set_F_D_parameters() as parameter SC_clk, where on line 96 it is used as division by zero

Screenshot 2024-02-21 114942.png

Then passed to SC_Configure_etu_baudrate() as parameter frequency, where on line 63 is used as division by zero, and the same on line 65.

Screenshot 2024-02-21 114846.png

Which results in BRR baudrate to 0

Screenshot 2024-02-21 115120.png


I do not think the T=1 can correctly work with firmware.


What should be the value of card_clk on STM32L0538-Discovery?


I said STM32F1 could do it by Software. May you need to do some changes since some basic implementation of T=1 was done by HW in some newest STM32. But I did it already on our first STM32F1.

Now it's been 13 years already, I forget the details. But I'm sure I did it with STM3210B-EVAL board!

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.