cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeF0 1.8.0 Smart Card Problem

mtien888
Associate II
Posted on July 20, 2017 at 00:44

I start a new project with smart card function generated by CubeMX with STM32F072RB. The smart card circuit is the same as previous project.  And I have no problem with smart card function in previous project.  I compared all the source code and finally realized the firmware is different version.  The previous firmware version is 1.6.0 and smart card is working well.  The new project using firmware 1.8.0 and smart card is not working with any command.  

I compared the driver generated and smart card code changes a lot.  Is there any where I can report this issue to CubeMx team? 

2 REPLIES 2
Imen.D
ST Employee
Posted on July 20, 2017 at 10:15

Hello

Tien.Michael

You can report your issue in the STM32 forum, then ST moderators will take in charge to answer you or raiseyour feedback/issues internally to the appropriate team.

Your description of the issue is general. Would you mind giving a little more detail about your issue, so we can better explain it to our development team? Could you please precise your which CubeMx version are you using?

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
mtien888
Associate II
Posted on July 21, 2017 at 01:05

I create a github repo for this problem.  

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST.git

 Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0

STM32CubeF0 firmware version 1.8.0 generated code doesn't work for smart card command. But it was working at previous version 1.6.0. (I haven't tried 1.7.0)

('init commit' is firmware version 1.6.0. 'firmware 1.8.0' is for firmware version 1.8.0)

Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0
  • STM32CubeMx version 4.21.0, STM32CubeF0 version 1.6.0 and 1.8.0
  • Keil uVision V5.23.0.0
Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0
  • STM32F072RB Discovery Board
  • ST8024L smart card interface
  • AT88SC0104C smartcard
Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0

STM32F072RBPIN NAMEST8024L

PB9(62)SCARD_RESETRSTIN (20)

PC13(2)SCARD_3_5V5V/~3V (3)

PC14(3)SCARD_OFF~OFF(23)

PC15(4)SCARD_VCC~CMDVCC(19)

PA9(42)SC_UART_TXI/OUC(26)

PA8(41)SC_UART_CKXTAL1(24)

Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0

Both firmware version have no problem to receive ATR 0x3B, 0xB2, 0x11, 0x00, 0x10, 0x80, 0x00, 0x01.

Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0
  • 0x00 0xB6 0x00 0x0C 0x04
  • This manufacture code is configured by user. Currently the test card had the code 7f 94 89 10.
Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST/blob/master/pics/fw1_6_0.png

Problem

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#software

Software

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#hardware

Hardware

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#connection

Connection

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#answer-to-resetatr-of-at88sc0104c

Answer To Reset(ATR) of AT88SC0104C

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#read-card-manufacture-code-command

Read Card Manufacture Code command

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-160-init-commit

Firmware STM32F0 CubeF0 version 1.6.0 (init commit)

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST#firmware-stm32f0-cubef0-version-180

Firmware STM32F0 CubeF0 version 1.8.0

https://github.com/MichaelTien8901/STM32F0-Smartcard-TEST/blob/master/pics/fw1_8_0.png

The data bus is not the same with different version of firmware. Data in firmware 1.8.0 seems corrupt and data can't be seen in UART.

Customized Code

Only main.c has custom code for the test.  Other files are generated by CubeMx.