cancel
Showing results for 
Search instead for 
Did you mean: 

Which firmware can I use for communication with a smart card via USART (smart card configuration) on STM32 U5?

ASavi.3
Associate II

Hi!

I want to use STM32 U5 for communication with smart cards. USART is configured in a smart card mode, but I don't know how to read ATR, send APDU commands. Is there existing firmware for this use case?

Can you give me advice which firmware can I use for communication with smart card?

Best regards,

Ana Savic

6 REPLIES 6
Mohamed Aymen HZAMI
ST Employee

Hello @ASavi.3​ and welcome to the community,

Do you have the required hardware to test the smart card or not?(an STM32U5 board with a smart card connector)

Mohamed Aymen

Mohamed Aymen HZAMI
ST Employee

You can use the STM32U575I-EV evaluation board it contains a smart_card slot, also there is an example in the STM32U5 Firmware under this path "STM32Cube_FW_U5_V1.1.0\Projects\STM32U575I-EV\Examples\SMARTCARD\SMARTCARD_ComDMA"

Mohamed Aymen

ASavi.3
Associate II

Hello @Mohamed Aymen HZAMI​  (ST Employee),

I don't have STM32U575I-EV evaluation board, but I have my PCB with STM32U5 (STM32U585AII6Q) where USART3 is directly connected to smart card slot. Do I need to have an additional analog interface (something like ST8024) between USART and smart card slot?

In SMARTCARD_ComDMA example is written that there is used STM32 GSM File system smart card, is it possible to use Java Card (jcop) smart card in this example?

Best regards,

Ana Savic

Mohamed Aymen HZAMI
ST Employee

Hello @ASavi.3​,

For the Smart Card interface with the STM32U5 you can check the schematic to make sure how to connect the slot with the microcontroller. this is the link to the STM32U575I-EV(MB1550).

For the second point:

  • if the Java Card use the same communication protocol as ST smart card then yes
  • if not then you cannot interface it with the STM32U5

Mohamed Aymen

ASavi.3
Associate II

Hello @Mohamed Aymen HZAMI (ST Employee),

I have a problem with USART3 with SmartCard with Card Clock configuration (pins PB0-CLK and PA7-TX) on STM32U585AII6Q.

You wrote me to use example SMARTCARD_ComDMA for STM32U575I-EV and to try communication with SmartCard. I created a new project for STM32U585AII6Q, changed the pins which I want to use, and copied configuration and code from example SMARTCARD_ComDMA. Also, I saw schematic for STM32U575I-EV, and find that between USART pins and smart card slot is ST8024. I have ST8024 and I use it between my STM32U585AII6Q and card slot. I use a SIM card.

The problem is that I haven't received an ATR. I tried to send some data via USART from U585 and to test what is happening on I/O line on the osciloscope. There is no any data on osciloscope. Then, I tried to use USART3 in Synchronous Master Mode and I could see sent data on the osciloscope. I use HAL and LL functions and behaviour is the same, with USART3 in Smartcard mode with card clock nothing is sent, but usart3 with synchonous mode transmit data correctly.

What could be a problem? I'm here if you need more information. How can I send data from USART3 with Smart Card with Card Clock configuration on STM32U585AII6Q?

Thanks for help,

Best regards,

Ana Savic

Hello @ASavi.3,

I am also looking for similar kind of implementation and facing the same issue w.r.t ATR capture on STM32585 board can you please let me know how did you solve this issue. 

Regards,