AnsweredAssumed Answered

BUG REPORT: stm32f4xx_hal_smartcard.c

Question asked by childress.steve on Feb 6, 2015
Latest reply on Mar 3, 2015 by Montassar BEN ROMDHANE
Two bugs. Using STM32F415 64 pin.

Bug 1. Smartcard mode (half duplex). USART config created by CubeMX (latest). 
This bug cures spurious and repeatable receiver overrun error while transmitting. Cure is leave parity error reporting on, per ISO7816. But disable other receiver errors.

    /* Enable the SMARTCARD Error Interrupt: (Frame error, noise error, overrun error) */
//TODO    __HAL_SMARTCARD_ENABLE_IT(hsc, SMARTCARD_IT_ERR);
//TODO    /* Disable half-duplex mode irrelevant errors in TX mode: SMARTCARD Error Interrupt: (Frame error, noise error, overrun error) */
    __HAL_SMARTCARD_DISABLE_IT(hsc, SMARTCARD_IT_ERR); //TODO


Bug 2. Same Smartcard mode as in bug 1. This bug causes Transmit Complete interrupt two bytes too soon. A big thanks to user waclawek.jan here for seeing this one.

  /* SMARTCARD in mode Transmitter (transmission end) ------------------------*/
  //TODO wrong:  if((tmp1 != RESET) && (tmp2 != RESET))
  if(((tmp1 & SMARTCARD_FLAG_TC) != RESET) && (tmp2 != RESET))  //TODO

===========
Need these corrections in the next CubeMX HAL library release, s.v.p.



Outcomes