cancel
Showing results for 
Search instead for 
Did you mean: 

BUG REPORT: stm32f4xx_hal_smartcard.c

childresss
Associate II
Posted on February 06, 2015 at 02:47

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.

1 REPLY 1
Posted on March 03, 2015 at 17:07

Hi childress.steve,

Thank you for bringing this issue to our attention. We’ll pass it along to our development team. Keep an eye out for the next update!

Regards,

Heisenberg.