stm32 - smartcard does not get ATR -
i using stm32l053r8 , tda8034. can not atr, using prepared code given st firm , sodexo card smart card. when debug code , stucks here.
/* read atr - loop until it's read */ { atr_size = sizeof(atr_buff); } while (hal_ok != atr_read(&scinterface, atr_buff, &atr_size)); and when entered atr_read funtion, noticed can't exit here return value hal_ok
/* read atr buffer (atr must sent 40000 clocks after reset) */ retval = hal_smartcard_receive(hsc, buffer, *buffersize, sc_cwt_timeout); #ifdef usart_v0 *buffersize = *buffersize - hsc->rxxfercount - 1; #else *buffersize = *buffersize - hsc->rxxfercount; # endif if ((*buffersize >= 2) && (retval == hal_timeout)) { retval = hal_ok; } return(retval); } is there can ?
Comments
Post a Comment