K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

K64 SmartCard I/F: Error when handling SW1 and 6x command..Smartcard is off

1,552 次查看
yklee1
Contributor II

Dear Team,

 

My customer found something strange at SmartCard interface like below.

At below point SmartCard is off with the response for example 0x6A(Application errors).

If you have, could you please share your experience with below codes?

 

@smart_card.c

/* Parse the ccid command */

static usb_status_t USB_DeviceCcidSmartCardCommandParse(usb_device_ccid_command_struct_t *command)

{

uint8_t EMVL1_SendApduCommand(uint8_t *commandApdu,

                              uint32_t commandApduLength,

                              uint8_t *ResponseApdu,

                              uint32_t *ResponseApduLength)

{

 

 if (error != kStatus_CCID_EMV_Success)

        {

            ccidResponse->bStatus =

                (USB_DEVICE_CCID_SLOT_STATUS_COMMAND_STATUS_FAILED) | (USB_DEVICE_CCID_SLOT_STATUS_ICC_PRESENT_ACTIVE);

            ccidResponse->bError = USB_DEVICE_CCID_SLOT_ERROR_HW_ERROR;

            EMVL1_SmartCardPowerOff();

            usb_device_ccid_data_block_response_t *ccid_datablock =

                (usb_device_ccid_data_block_response_t *)&g_UsbDeviceCcidSmartCard

                    .slotsAtrBuffer[usbDeviceCcidCommand->bSlot][0];

            receiveLength = USB_DEVICE_CCID_ATR_BUFFER_LENGTH - USB_DEVICE_CCID_RESPONSE_HEADER_LENGTH;

            EMVL1_SmartCardPowerOn(ccid_datablock->abData, &receiveLength);

        }

 

Best Regards,

YK Lee

标签 (1)
0 项奖励
回复
3 回复数

1,401 次查看
yklee1
Contributor II

Hi Iva,

Thanks a lot for your help.

Actually customer is using UART IF for Smartcard IF.

Best Regards,

YK Lee

0 项奖励
回复

1,400 次查看
ivadorazinova
NXP Employee
NXP Employee

Hello YK Lee,

Please, are you using USB IF to Smartcard IF?

Thank you.

Best Regards,

0 项奖励
回复

1,401 次查看
ivadorazinova
NXP Employee
NXP Employee

Hi YK Lee,

thank you for your question.

We will let you know as soon as possible.

Best Regards,

Iva

0 项奖励
回复