cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_SMARTCARD_Receive returns HAL_TIMEOUT.

SMac
Associate II

Well, I use STM32 Nucleo F429Zi and Stm32 Cube IDE v. 1.0.2. I connected SmartCard and STM32 correctly (my oscilloscope shows rigth values of RST, IO and CLK) but in code i see zero filled buffer each SET/RESET iteration where ATR should be. Here's some code:

HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12, GPIO_PIN_RESET);

HAL_Delay(500);

HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12, GPIO_PIN_SET);

convention = HAL_SMARTCARD_Receive(&hsc2, pBuf, sizeof(pBuf), 500); // here is HAL_TIMEOUT but should be HAL_OK

HAL_Delay(20);

HAL_GPIO_WritePin(GPIOF, GPIO_PIN_12, GPIO_PIN_SET);

HAL_Delay(300);

0 REPLIES 0