AnsweredAssumed Answered

I can not get atr by using of st's code

Question asked by hasan bucak on Sep 12, 2017
Latest reply on Sep 14, 2017 by Clive One

Hi, I am new to stm and I have STM32L053R8 - NUCLEO, I have to make a smartcard project with this. I am using prepared code by given ST Firm and a smartcard. When I debug the code , it stucks.

 the code of smartcard project is


I have been trying to get ATR for 1 mounth, but it stucks in code-1

 I entered inside of atr_read and tried to find the problem, I think that the problem is about HAL_TIMEOUT.

is there anyone who can help me to solve this ?

I put here code that I believed the problem is linked with (code-2). 

Please help me









/* Read ATR - loop until it's read */
atr_size = sizeof(atr_buff);
while (HAL_OK != ATR_Read(&SCInterface, atr_buff, &atr_size)); // it does not get out of here



if(SMARTCARD_WaitOnFlagUntilTimeout(hsc, SMARTCARD_FLAG_RXNE, RESET, Timeout) != HAL_OK)